luaA_warn: Balance stack (#2106)

In Lua 5.2 or newer, this function left a string on the Lua stack. Fix
this by popping this string.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-11-08 18:47:37 +01:00 committed by Daniel Hahler
parent b2fac56b9c
commit e20068cb4a
1 changed files with 1 additions and 0 deletions

1
luaa.h
View File

@ -67,6 +67,7 @@ luaA_warn(lua_State *L, const char *fmt, ...)
#if LUA_VERSION_NUM >= 502
luaL_traceback(L, L, NULL, 2);
fprintf(stderr, "%s\n", lua_tostring(L, -1));
lua_pop(L, 1);
#endif
}