mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Fix #6535
This commit is contained in:
parent
5eca122f04
commit
6a19a66ae5
@ -170,7 +170,7 @@ namespace LuaUtil
|
||||
sol::environment env(mLua, sol::create, mSandboxEnv);
|
||||
sol::table loaded(mLua, sol::create);
|
||||
for (const std::string& s : safePackages)
|
||||
loaded[s] = mSandboxEnv[s];
|
||||
loaded[s] = static_cast<sol::object>(mSandboxEnv[s]);
|
||||
env["require"] = [this, loaded, env](const std::string& module) mutable
|
||||
{
|
||||
if (loaded[module] != sol::nil)
|
||||
|
Loading…
x
Reference in New Issue
Block a user