From fd4054e3454abe1628dfaa932209bd1a9bc8fbd4 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 11 Oct 2010 23:33:03 +0000 Subject: [PATCH] - attempt to fix lua code that might be crashing the game --- source/shared_lib/sources/lua/lua_script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/shared_lib/sources/lua/lua_script.cpp b/source/shared_lib/sources/lua/lua_script.cpp index ccb5f7fd7..2f1f158e2 100644 --- a/source/shared_lib/sources/lua/lua_script.cpp +++ b/source/shared_lib/sources/lua/lua_script.cpp @@ -95,14 +95,14 @@ void LuaScript::loadCode(const string &code, const string &name){ } void LuaScript::beginCall(const string& functionName) { - //Lua_STREFLOP_Wrapper streflopWrapper; + Lua_STREFLOP_Wrapper streflopWrapper; currentLuaFunction = functionName; SystemFlags::OutputDebug(SystemFlags::debugLUA,"In [%s::%s Line: %d] functionName [%s]\n",__FILE__,__FUNCTION__,__LINE__,functionName.c_str()); SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] functionName [%s]\n",__FILE__,__FUNCTION__,__LINE__,functionName.c_str()); lua_getglobal(luaState, functionName.c_str()); - currentLuaFunctionIsValid = lua_isfunction(luaState,lua_gettop(luaState)); + currentLuaFunctionIsValid = (lua_isfunction(luaState,lua_gettop(luaState)) == 1); argumentCount= 0; }