<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39398 >
Commited the attached patch to S2_1 r13074 and trunk r13075 As this is probably the cause of this crash (letting player gold go below 0) this bug could be marked closed. (PR#39398): 2.1.0-beta4 Fantasy modpack crash Make sure only sellable improvements counted in potential gold, so that player gold can't go below 0. A very probable fix for a hard to reproduce crash. modified: server/unittools.c
Index: server/unittools.c =================================================================== --- server/unittools.c (revision 13028) +++ server/unittools.c (arbetskopia) @@ -282,7 +282,9 @@ int potential_gold = 0; built_impr_iterate(pcity, pimpr) { - potential_gold += impr_sell_gold(pimpr); + if (can_city_sell_building(pcity, pimpr)) { + potential_gold += impr_sell_gold(pimpr); + } } built_impr_iterate_end; unit_list_iterate_safe(pcity->units_supported, punit) {
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev