Commit c82f86f1 authored by neoxic's avatar neoxic
Browse files

Since Lua 5.4 lua_pushvfstring() no longer checks stack

parent 1355fae7
...@@ -145,6 +145,9 @@ static int isInteger(lua_State *L, int idx, lua_Integer *val) { ...@@ -145,6 +145,9 @@ static int isInteger(lua_State *L, int idx, lua_Integer *val) {
static int error(lua_State *L, int *nerr, const char *fmt, ...) { static int error(lua_State *L, int *nerr, const char *fmt, ...) {
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
#if LUA_VERSION_NUM >= 504
luaL_checkstack(L, 1, 0);
#endif
lua_pushvfstring(L, fmt, ap); lua_pushvfstring(L, fmt, ap);
va_end(ap); va_end(ap);
lua_insert(L, -(++(*nerr))); lua_insert(L, -(++(*nerr)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment