URL: <http://gna.org/bugs/?21946>
Summary: Division by zero when barbarians conquer a city Project: Freeciv Submitted by: cazfi Submitted on: Mon 21 Apr 2014 10:32:20 AM EEST Category: general Severity: 3 - Normal Priority: 5 - Normal Status: In Progress Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: None Planned Release: 2.5.0, 2.6.0 _______________________________________________________ Details: More generally: Crash when player with no (previous) cities gains a tech. For barbarians that happens when they conquer a city and we handle the conquest tech before actual city transfer. The same could happen if explorer finds tech from a hut before first city is founded, or by a number of mechanisms later in game if player has lost all his cities but remains alive thanks to some units. I encountered this while working on another thing I need to finish first, but the problem is in new "new hope sweeps like fire" -code where percentage of affected cities is calculated, including "/ city_list_size(pplayer->cities)" -part. _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?21946> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev