Skip to content

Commit 33bb079

Browse files
committed
Fixed #9705 (coroutine.resume returns only the first value returned by the coroutine)
1 parent a05370e commit 33bb079

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Shared/mods/deathmatch/logic/luascripts/coroutine_debug.lua.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ local outputDebugString = outputDebugString
1515
coroutine._resume = coroutine.resume -- For access to the original function
1616
local _coroutine_resume = coroutine.resume
1717
function coroutine.resume(...)
18-
local state,result = _coroutine_resume(...)
19-
if not state then
20-
outputDebugString( tostring(result), 1 )
18+
local result = {_coroutine_resume(...)}
19+
if not result[1] then
20+
outputDebugString( tostring(result[2]), 1 )
2121
end
22-
return state,result
22+
return unpack(result)
2323
end
2424
2525
)~LUA~";

0 commit comments

Comments
 (0)