summaryrefslogtreecommitdiffhomepage
path: root/libs/sgi-wsapi/luasrc/sgi
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sgi-wsapi/luasrc/sgi')
-rw-r--r--libs/sgi-wsapi/luasrc/sgi/wsapi.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
index ebae9fc27..3b5302599 100644
--- a/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
+++ b/libs/sgi-wsapi/luasrc/sgi/wsapi.lua
@@ -59,11 +59,14 @@ function run(wsapi_env)
end
local function iter()
- local res, id, data1, data2 = coroutine.resume(x)
- if not res or id == 5 then
+ local res, id, data = coroutine.resume(x)
+ if id == 4 then
+ return data
+ elseif id == 5 then
+ return ""
+ end
+ if coroutine.status(x) == "dead" then
return nil
- else
- return data1
end
end