fix: wrong environment used in modules imported by require(...)
This commit is contained in:
@@ -104,6 +104,9 @@ void lua::init_state(State* L, StateType stateType) {
|
||||
pushnil(L);
|
||||
setglobal(L, "io");
|
||||
|
||||
createtable(L, 0, 0);
|
||||
setglobal(L, "__vc__pack_envs");
|
||||
|
||||
const char* removed_os[] {
|
||||
"execute", "exit", "remove", "rename", "setlocale", "tmpname", nullptr};
|
||||
remove_lib_funcs(L, "os", removed_os);
|
||||
|
||||
Reference in New Issue
Block a user