Merge a4d2c21a733f7f29e326a07c616e8cd3f87f8dee into 7d9eac5584e238a890a388a0f697c27c7391caa4

This commit is contained in:
zeng-git 2025-08-29 01:14:48 +08:00 committed by GitHub
commit eda9537989
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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