Skip to content

Commit

Permalink
Updated lua_rawget check to make it compatible with Lua 5.2 (closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulchenko committed Jan 22, 2020
1 parent 7abfef0 commit 8735394
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wxLua/modules/wxlua/bit.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ static int libsize (const luaL_Reg *l) {
static void pushmodule (lua_State *L, const char *modname, int sizehint) {
lua_pushglobaltable(L);
lua_pushstring(L, modname);
if (lua_rawget(L, -2) != LUA_TNIL) { /* no such field? */
lua_rawget(L, -2);
if (!lua_isnil(L, -1)) {
luaL_error(L, "name conflict for module '%s'", modname);
}
lua_pop(L, 1); /* remove this nil */
Expand Down

0 comments on commit 8735394

Please sign in to comment.