<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40070 >

This will be applicable to all branches!

In 2.1, has 60 occurrences in 20 files.
In 2.2, has 63 occurrences in 23 files.

In this case, the code already has a FIXME over two years old!

It clearly indicates:

     /* It is a virtual unit, so must start in a city... */
     struct city *pcity = tile_city(punit->tile);

     /* The default is to lose 100%.  The growth bonus reduces this. */
     int foodloss_pct = 100 - get_city_bonus(pcity, EFT_GROWTH_FOOD);

There's no question that pcity should *not* be NULL.

My guess is this is another bug related to old/new border calculation, as in
PR#40069, because there's been a long history of problems with the tile not
pointing to the expected city.  One of the problems that new deterministic
border code was made to correct!



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to