Skip to content

Commit

Permalink
Number of elements in the stack <= 1
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhiya committed May 19, 2024
1 parent 7aae939 commit 87aeb78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/fittencode/views/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ end
local stack = {}

local function push_stack(x)
if #stack == 0 or stack[#stack] ~= x then
if #stack == 0 then
table.insert(stack, x)
else
table.remove(stack)
Expand Down

0 comments on commit 87aeb78

Please sign in to comment.