mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
Merge a4d2c21a733f7f29e326a07c616e8cd3f87f8dee into 7d9eac5584e238a890a388a0f697c27c7391caa4
This commit is contained in:
commit
eda9537989
@ -52,7 +52,9 @@ end
|
|||||||
_coroutine.wrap = function(f)
|
_coroutine.wrap = function(f)
|
||||||
local thread = coroutine.create(f)
|
local thread = coroutine.create(f)
|
||||||
return function(...)
|
return function(...)
|
||||||
return select(2, coroutine.resume(thread, ...))
|
local result_pack = table.pack(coroutine.resume(thread, ...))
|
||||||
|
if not result_pack[1] then error(result_pack[2], 2) end
|
||||||
|
return table.unpack(result_pack, 2, result_pack.n)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user