Fix StackZone crash when divideCardSpaceInZone overflows

The divideCardSpaceInZone function introduced in #4930 is buggy and
sometimes returns an index that is too large for the current zone, which
causes us to call `cards.at(index)` with an `index` that's bigger than
the amount of cards.

This is the bug that #5609 intended to fix but was improperly diagnosed.
Remove part of #5609 as the cases it is guarding against (e.g. null card
pointer) cannot actually happen.
This commit is contained in:
Basile Clément 2025-03-19 20:54:12 +01:00
parent c219d8bdbb
commit fd2f007d16
No known key found for this signature in database
3 changed files with 14 additions and 19 deletions

View file

@ -47,12 +47,10 @@
# card_info = false
# card_list = false
# stack_zone = false
flow_layout.debug = false
flow_widget.debug = false
flow_widget.size.debug = false
# pixel_map_generator = false
# filter_string = false
# filter_string = false