From 0b17e5dac3b33877b161270a063e5fa4cd0b685c Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 22 Oct 2016 10:44:54 +0200 Subject: [PATCH] Fix unbalanced Lua stack operation (#1162) Add a single "do" to the beginning of the config. This causes a parsing error ("'end' expected") and then another warning saying "something was left on the Lua stack. Fix this by popping the error message where we need to do so. Signed-off-by: Uli Schlachter --- luaa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/luaa.c b/luaa.c index 635db7670..8c718b7a3 100644 --- a/luaa.c +++ b/luaa.c @@ -782,6 +782,7 @@ luaA_loadrc(const char *confpath, bool run) const char *err = lua_tostring(L, -1); luaA_startup_error(err); fprintf(stderr, "%s\n", err); + lua_pop(L, 1); return false; }