diff options
Diffstat (limited to 'src/lua-interface.cpp')
-rw-r--r-- | src/lua-interface.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lua-interface.cpp b/src/lua-interface.cpp index c26df03..d05b95a 100644 --- a/src/lua-interface.cpp +++ b/src/lua-interface.cpp @@ -998,10 +998,18 @@ virtual int startup() throw (GeneralException) { built.write(lua_interface_light_lua, size_lua_interface_light_lua); try { + bool passthru = true; + try { + new Archive(argv[0], ARCHIVE_EXECUTABLE); + } + catch (...) { + passthru = false; + } L->load(&built); L->push("lua_interface_light_main"); L->gettable(LUA_GLOBALSINDEX); - L->call(0, 1); + L->push(passthru); + L->call(1, 1); interactive = L->toboolean(); L->pop(); if (interactive) { |