mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 16:57:32 -04:00
safer to try to load a library full before removing metatable in case of oom
This commit is contained in:
parent
6a2586b536
commit
e3525d9a00
@ -72,9 +72,9 @@ end
|
|||||||
function package.delay(lib, file)
|
function package.delay(lib, file)
|
||||||
local mt = {
|
local mt = {
|
||||||
__index = function(tbl, key)
|
__index = function(tbl, key)
|
||||||
|
dofile(file)
|
||||||
setmetatable(lib, nil)
|
setmetatable(lib, nil)
|
||||||
setmetatable(lib.internal or {}, nil)
|
setmetatable(lib.internal or {}, nil)
|
||||||
dofile(file)
|
|
||||||
return tbl[key]
|
return tbl[key]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user