From e20068cb4a781b7bb2f384fecee9bb6aa80de7e7 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 8 Nov 2017 18:47:37 +0100 Subject: [PATCH] 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 --- luaa.h | 1 + 1 file changed, 1 insertion(+) diff --git a/luaa.h b/luaa.h index d1420d3d..6f6f34f1 100644 --- a/luaa.h +++ b/luaa.h @@ -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 }