From ab87b02b336e8abec34e5ae9f9106331adfeb245 Mon Sep 17 00:00:00 2001 From: Gregor Date: Sun, 18 Feb 2024 16:51:03 +0100 Subject: [PATCH] Allow dequeue again for "new" function also --- lua_modules/fifo/fifo.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua_modules/fifo/fifo.lua b/lua_modules/fifo/fifo.lua index ab83b23b0..1d2ea1651 100644 --- a/lua_modules/fifo/fifo.lua +++ b/lua_modules/fifo/fifo.lua @@ -22,12 +22,12 @@ local function dequeue(q, k) local new, again = k(q[1], #q == 1) if new == nil then tableRemove(q, 1) - if again then - return dequeue(q, k) - end -- note tail call else q[1] = new end + if again then + return dequeue(q, k) + end -- note tail call return true else q._go = true