diff options
-rw-r--r-- | plugins/MirLua/src/mlua_script.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp index e0d3cc461b..26c4006e2d 100644 --- a/plugins/MirLua/src/mlua_script.cpp +++ b/plugins/MirLua/src/mlua_script.cpp @@ -49,7 +49,9 @@ bool CMLuaScript::Load() return false;
}
- lua_newtable(L);
+ lua_createtable(L, 0, 1);
+ lua_pushvalue(L, -1);
+ lua_setfield(L, -2, "_G");
lua_createtable(L, 0, 1);
lua_getglobal(L, "_G");
lua_setfield(L, -2, "__index");
|