]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/engine: fixed Lua 5.2 compatibility
authorMarek Vavruša <marek.vavrusa@nic.cz>
Tue, 21 Jul 2015 12:41:57 +0000 (14:41 +0200)
committerGrigorii Demidov <grigorii.demidov@nic.cz>
Wed, 5 Aug 2015 12:18:39 +0000 (14:18 +0200)
daemon/engine.c

index 10571f3440ea32a7a99f20c1cec66e82064b496d..0096c4cb09462c743ce1cb0b700c0bfaeb2b4af3 100644 (file)
@@ -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 ) {