diff options
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r-- | src/scripting/lua.cpp | 4 |
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 *)®istryKey); + lua_pushlightuserdata(mState, const_cast<char *>(®istryKey)); 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"); |