summaryrefslogtreecommitdiff
path: root/src/scripting/lua.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r--src/scripting/lua.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp
index 63149792..b9c76c23 100644
--- a/src/scripting/lua.cpp
+++ b/src/scripting/lua.cpp
@@ -2703,9 +2703,9 @@ LuaScript::LuaScript():
LuaMapObject::registerType(mState, "MapObject", members_MapObject);
// Make script object available to callback functions.
- lua_pushlightuserdata(mState, (void *)&registryKey);
+ lua_pushlightuserdata(mState, const_cast<char *>(&registryKey));
lua_pushlightuserdata(mState, this);
- lua_settable(mState, LUA_REGISTRYINDEX);
+ lua_rawset(mState, LUA_REGISTRYINDEX);
// Push the error handler to first index of the stack
lua_getglobal(mState, "debug");