From 0f5d0859b451f7cd716422a8b389129eb135ed60 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sun, 9 Jun 2013 01:18:44 +0100 Subject: Possibly fix crash due to Lua running out of stack space diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp index df7176d..d40309c 100644 --- a/src/cat/LuaScriptInterface.cpp +++ b/src/cat/LuaScriptInterface.cpp @@ -2778,6 +2778,7 @@ void LuaScriptInterface::OnTick() { lua_getglobal(l, "simulation"); lua_pushinteger(l, luacon_sim->NUM_PARTS); lua_setfield(l, -2, "NUM_PARTS"); + lua_pop(l, 1); ui::Engine::Ref().LastTick(clock()); if(luacon_mousedown) luacon_mouseevent(luacon_mousex, luacon_mousey, luacon_mousebutton, LUACON_MPRESS, 0); -- cgit v0.9.2-21-gd62e