diff options
author | Mattes D <github@xoft.cz> | 2015-09-28 14:53:50 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-09-28 14:53:50 +0200 |
commit | 561405664096f268738fb2cd10b2accd3b551915 (patch) | |
tree | 48606b0db6225a4b6974d591d8490f27c3166542 /src/Bindings/LuaState.cpp | |
parent | Merge pull request #2498 from cuberite/UnicodeOnWindows (diff) | |
download | cuberite-561405664096f268738fb2cd10b2accd3b551915.tar cuberite-561405664096f268738fb2cd10b2accd3b551915.tar.gz cuberite-561405664096f268738fb2cd10b2accd3b551915.tar.bz2 cuberite-561405664096f268738fb2cd10b2accd3b551915.tar.lz cuberite-561405664096f268738fb2cd10b2accd3b551915.tar.xz cuberite-561405664096f268738fb2cd10b2accd3b551915.tar.zst cuberite-561405664096f268738fb2cd10b2accd3b551915.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaState.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp index c9e7815ca..1509bd19f 100644 --- a/src/Bindings/LuaState.cpp +++ b/src/Bindings/LuaState.cpp @@ -1065,7 +1065,7 @@ bool cLuaState::CheckParamString(int a_StartParam, int a_EndParam) tolua_Error tolua_err; for (int i = a_StartParam; i <= a_EndParam; i++) { - if (tolua_isstring(m_LuaState, i, 0, &tolua_err)) + if (lua_isstring(m_LuaState, i)) { continue; } @@ -1073,6 +1073,9 @@ bool cLuaState::CheckParamString(int a_StartParam, int a_EndParam) lua_Debug entry; VERIFY(lua_getstack(m_LuaState, 0, &entry)); VERIFY(lua_getinfo (m_LuaState, "n", &entry)); + tolua_err.array = 0; + tolua_err.type = "string"; + tolua_err.index = i; AString ErrMsg = Printf("#ferror in function '%s'.", (entry.name != nullptr) ? entry.name : "?"); tolua_error(m_LuaState, ErrMsg.c_str(), &tolua_err); return false; |