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~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a032a9664836336e830e72492a409b227029b712;p=thirdparty%2Fknot-resolver.git daemon/engine: fixed Lua 5.2 compatibility --- diff --git a/daemon/engine.c b/daemon/engine.c index d9b078c70..5db9afa3a 100644 --- a/daemon/engine.c +++ b/daemon/engine.c @@ -358,7 +358,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 ) {