Lua: Fix _G[""] being a reference to _G

This is harmless but silly, so let's not do it.
This commit is contained in:
Celtic Minstrel 2021-05-13 19:37:00 -04:00
parent 7334cc97c9
commit 41f2263c09

View file

@ -495,7 +495,7 @@ lua_kernel_base::lua_kernel_base()
};
for (luaL_Reg const *lib = safe_libs; lib->func; ++lib)
{
luaL_requiref(L, lib->name, lib->func, true);
luaL_requiref(L, lib->name, lib->func, strlen(lib->name));
lua_pop(L, 1); /* remove lib */
}