aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c-api/compat-5.3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c
index 2fdd36d..962b951 100644
--- a/c-api/compat-5.3.c
+++ b/c-api/compat-5.3.c
@@ -510,7 +510,7 @@ COMPAT53_API size_t lua_stringtonumber (lua_State *L, const char *s) {
510COMPAT53_API void luaL_requiref (lua_State *L, const char *modname, 510COMPAT53_API void luaL_requiref (lua_State *L, const char *modname,
511 lua_CFunction openf, int glb) { 511 lua_CFunction openf, int glb) {
512 luaL_checkstack(L, 3, "not enough stack slots available"); 512 luaL_checkstack(L, 3, "not enough stack slots available");
513 lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); 513 luaL_getsubtable(L, LUA_REGISTRYINDEX, "_LOADED");
514 if (lua_getfield(L, -1, modname) == LUA_TNIL) { 514 if (lua_getfield(L, -1, modname) == LUA_TNIL) {
515 lua_pop(L, 1); 515 lua_pop(L, 1);
516 lua_pushcfunction(L, openf); 516 lua_pushcfunction(L, openf);