summaryrefslogtreecommitdiff
path: root/src/scripting/luascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripting/luascript.cpp')
-rw-r--r--src/scripting/luascript.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/scripting/luascript.cpp b/src/scripting/luascript.cpp
index 97b03e1d..a3dcb1d4 100644
--- a/src/scripting/luascript.cpp
+++ b/src/scripting/luascript.cpp
@@ -151,7 +151,11 @@ bool LuaScript::resume()
setMap(mCurrentThread->mMap);
const int tmpNbArgs = nbArgs;
nbArgs = -1;
+#if LUA_VERSION_NUM < 502
int result = lua_resume(mCurrentState, tmpNbArgs);
+#else
+ int result = lua_resume(mCurrentState, NULL, tmpNbArgs);
+#endif
setMap(0);
if (result == 0) // Thread is done