#48296: Off-by-one error in city_size_add() assert Open Date: 2023-06-26 13:42 Last Update: 2023-06-26 13:42 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/48296 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48296 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-06-26 13:42 Updated by: cazfi * New Ticket "Off-by-one error in city_size_add() assert" created --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Bugs Status: Open Priority: 5 - Medium MileStone: 3.0.9 Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: city_size_add(): fc_assert_ret(MAX_CITY_SIZE - size > add); When city is already size 254, and one would add the final citizen, this fails (255 - 254 is not GREATER than 1) -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/48296 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=48296