Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kürzeder committed Jul 22, 2019
1 parent 8f5281f commit 3d38c00
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions module/UItils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ class Utils
if (lua_type(lua_vm, -1) != LUA_TSTRING || lua_type(lua_vm, -2) != LUA_TSTRING)
{
stringstream ss;
ss << "Bad Argument @ parse_named_table. Got invalid table entry, expected key(string) and value(string), but was key(" << lua_typename(lua_vm, lua_type(lua_vm, -2)) << ") and value(" << lua_typename(lua_vm, lua_type(lua_vm, -1)) << "). Skipping...";
pModuleManager->ErrorPrintf(ss.str().c_str());
lua_error(lua_vm);
break;
ss << "Bad Argument @ parse_named_table. Got invalid table entry, expected key(string) and value(string), but was key(" << lua_typename(lua_vm, lua_type(lua_vm, -2)) << ") and value(" << lua_typename(lua_vm, lua_type(lua_vm, -1)) << ").";
luaL_error(lua_vm, ss.str().c_str());
return {};
}

result[lua_tostring(lua_vm, -2)] = lua_tostring(lua_vm, -1);
Expand Down

0 comments on commit 3d38c00

Please sign in to comment.