Closed Jerboa-app closed 1 year ago
Fixed in #96
Requires a debug function to be inserted before calling pcall, so instead of lua_dofile we do...
lua_dofile
bool runFile(std::string file) { if (luaIsOk()) { lastCommandOrProgram = file; lastStatus = luaL_loadfile(lua, file.c_str()); // location of custom error handler int epos = lua_gettop(lua); // push the custom handler lua_pushcfunction(lua, traceback); lua_insert(lua, epos); // run the file passing in the handler lastStatus = lastStatus || lua_pcall(lua, 0, LUA_MULTRET, epos); lua_remove(lua, epos); return handleErrors(); } return false; }
Fixed in #96
Requires a debug function to be inserted before calling pcall, so instead of
lua_dofile
we do...