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 <psychon@znc.in>
This commit is contained in:
parent
7292be1add
commit
0b17e5dac3
1
luaa.c
1
luaa.c
|
@ -782,6 +782,7 @@ luaA_loadrc(const char *confpath, bool run)
|
||||||
const char *err = lua_tostring(L, -1);
|
const char *err = lua_tostring(L, -1);
|
||||||
luaA_startup_error(err);
|
luaA_startup_error(err);
|
||||||
fprintf(stderr, "%s\n", err);
|
fprintf(stderr, "%s\n", err);
|
||||||
|
lua_pop(L, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue