Correctly pop stuff from the Lua stack in script_load()

master
Perttu Ahola 2011-12-31 14:41:57 +02:00
parent 135a65e200
commit 7b7b68cdab
1 changed files with 2 additions and 0 deletions

View File

@ -101,8 +101,10 @@ bool script_load(lua_State *L, const char *path)
errorstream<<"[LUA] "<<lua_tostring(L, -1)<<std::endl;
errorstream<<"[LUA] "<<std::endl;
lua_pop(L, 1); // Pop error message from stack
lua_pop(L, 1); // Pop the error handler from stack
return false;
}
lua_pop(L, 1); // Pop the error handler from stack
return true;
}