summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_util.cpp')
-rw-r--r--src/script/lua_api/l_util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp
index 12146e80a..4b8b6d351 100644
--- a/src/script/lua_api/l_util.cpp
+++ b/src/script/lua_api/l_util.cpp
@@ -371,7 +371,7 @@ int ModApiUtil::l_request_insecure_environment(lua_State *L)
lua_getglobal(L, "_G");
return 1;
}
- lua_getfield(L, LUA_REGISTRYINDEX, SCRIPT_MOD_NAME_FIELD);
+ lua_rawgeti(L, LUA_REGISTRYINDEX, CUSTOM_RIDX_CURRENT_MOD_NAME);
if (!lua_isstring(L, -1)) {
lua_pushnil(L);
return 1;
@@ -383,7 +383,7 @@ int ModApiUtil::l_request_insecure_environment(lua_State *L)
lua_pushnil(L);
return 1;
}
- lua_getfield(L, LUA_REGISTRYINDEX, "globals_backup");
+ lua_rawgeti(L, LUA_REGISTRYINDEX, CUSTOM_RIDX_GLOBALS_BACKUP);
return 1;
}