From: Marek VavruĊĦa Date: Tue, 21 Jul 2015 12:41:57 +0000 (+0200) Subject: daemon/engine: fixed Lua 5.2 compatibility X-Git-Tag: v1.0.0-beta1~58^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e9dbf235dccccc17ae619f4bd130b258c529edd;p=thirdparty%2Fknot-resolver.git daemon/engine: fixed Lua 5.2 compatibility --- diff --git a/daemon/engine.c b/daemon/engine.c index 10571f344..0096c4cb0 100644 --- a/daemon/engine.c +++ b/daemon/engine.c @@ -394,7 +394,9 @@ static int engine_loadconf(struct engine *engine) } /* Use module path for including Lua scripts */ int ret = engine_cmd(engine, "package.path = package.path..';" PREFIX MODULEDIR "/?.lua'"); - lua_pop(engine->L, 1); + if (ret > 0) { + lua_pop(engine->L, 1); + } /* Load config file */ if(access("config", F_OK ) != -1 ) {