fix: check for a card in the stack before checking rank
parent
ce5a238870
commit
346070c51d
|
@ -335,7 +335,7 @@ function update()
|
||||||
local has_won=true
|
local has_won=true
|
||||||
for i=3,6 do
|
for i=3,6 do
|
||||||
local stack=stacks[i]
|
local stack=stacks[i]
|
||||||
has_won=(has_won and stack[#stack].rank>=13)
|
has_won=(has_won and #stack>0 and stack[#stack].rank>=13)
|
||||||
end
|
end
|
||||||
if has_won then
|
if has_won then
|
||||||
pmem(WIN_COUNT_SLOT, pmem(WIN_COUNT_SLOT) + 1)
|
pmem(WIN_COUNT_SLOT, pmem(WIN_COUNT_SLOT) + 1)
|
||||||
|
|
Loading…
Reference in New Issue