summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-06-12 18:24:01 +0200
committerMattes D <github@xoft.cz>2016-06-27 20:51:52 +0200
commit7a6670d1d110be96ed73ccab4f33c69e4a01f28d (patch)
treed85a6aa0d3c01d730d47c3b0306ea837c9704b4c /src/Bindings/LuaState.cpp
parentcPluginManager: Use a callback for command handler registration. (diff)
downloadcuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.tar
cuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.tar.gz
cuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.tar.bz2
cuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.tar.lz
cuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.tar.xz
cuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.tar.zst
cuberite-7a6670d1d110be96ed73ccab4f33c69e4a01f28d.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 0d958cc20..109809cab 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -553,7 +553,7 @@ bool cLuaState::PushFunction(const char * a_FunctionName)
-bool cLuaState::PushFunction(int a_FnRef)
+bool cLuaState::PushFunction(const cRef & a_FnRef)
{
ASSERT(IsValid());
ASSERT(m_NumCurrentFunctionArgs == -1); // If not, there's already something pushed onto the stack
@@ -561,7 +561,7 @@ bool cLuaState::PushFunction(int a_FnRef)
// Push the error handler for lua_pcall()
lua_pushcfunction(m_LuaState, &ReportFnCallErrors);
- lua_rawgeti(m_LuaState, LUA_REGISTRYINDEX, a_FnRef); // same as lua_getref()
+ lua_rawgeti(m_LuaState, LUA_REGISTRYINDEX, static_cast<int>(a_FnRef)); // same as lua_getref()
if (!lua_isfunction(m_LuaState, -1))
{
lua_pop(m_LuaState, 2);