Firch / Bunco

36 stars 7 forks source link

License Plate crashes the game when deck is empty. #41

Open pinkmaggit-hub opened 1 month ago

pinkmaggit-hub commented 1 month ago

The crash says Bunco.lua"]:1643: attempt to index a nil value. It happens because when the deck is empty, the combination{} table can't be filled at line 1643, since there's no cards in deck to fill it. It can be fixed by adding and #G.deck.cards ~= 0 to the if statement at line 1632 of Bunco.lua, like so:

image (1)

However, with this workaround, when the deck is empty, the plate isn't updated at the end of Round.