]> git.lizzy.rs Git - hydra-dragonfire.git/commitdiff
Fix hydra.poll return value order
authorElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 30 May 2022 19:44:02 +0000 (21:44 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 30 May 2022 19:44:02 +0000 (21:44 +0200)
hydra.go

index eb5642504593f3729abf9f039ff335075fdc078a..55fe914bfe65e65f2d4e2a45456fc758b7954a02 100644 (file)
--- a/hydra.go
+++ b/hydra.go
@@ -61,12 +61,12 @@ func l_canceled(l *lua.LState) int {
 
 func l_poll(l *lua.LState) int {
        client, pkt, timeout := doPoll(l, getClients(l))
+       l.Push(convert.PushPkt(l, pkt))
        if client == nil {
                l.Push(lua.LNil)
        } else {
                l.Push(client.userdata)
        }
-       l.Push(convert.PushPkt(l, pkt))
        l.Push(lua.LBool(timeout))
        return 3
 }