From 0b583122fb6cfcff991c54836d37cb3958c343b1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 3 May 2017 18:48:31 +0200 Subject: Stuff ? (keyboard...) --- src/syslua/lx/mainloop.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/syslua/lx/mainloop.lua') diff --git a/src/syslua/lx/mainloop.lua b/src/syslua/lx/mainloop.lua index c2ae88d..b1b3feb 100644 --- a/src/syslua/lx/mainloop.lua +++ b/src/syslua/lx/mainloop.lua @@ -21,6 +21,7 @@ function new_fd(fd, error_cb) function fd:expect(len, cb) table.insert(self.rd_expect, {len, "", cb}) end + return fd end function mainloop.add_fd(fd, error_cb) @@ -55,7 +56,7 @@ function mainloop.run() local res = sys.select(sel_fds, -1) assert(res, "select() call failed") - for i, fd = pairs(fds) do + for i, fd in pairs(fds) do local flags = sel_fds[i][3] if flags & sysdef.SEL_ERROR ~= 0 then fd.error_cb(fd) -- cgit v1.2.3