Follow-up Comment #5, bug #15498 (project freeciv):

before I talk to much nonsens like this

> this should be 'pother_city == NULL' 

I looked again into the code and look long and hard.

> There are similar assertions in S2_2. Why doesn't it fails there? 

trunk is missing the check 'if (pother_city)' for remove_trade_route() which
exists in S2_2 (lines 1283ff in S2_2):


1279  for (o = 0; o < NUM_TRADE_ROUTES; o++) {
1280     struct city *pother_city =
game_find_city_by_number(pcity->trade[o]);
1281 
1282     fc_assert_action(pcity->trade[o] == 0 || pother_city != NULL,
continue);
1283     remove_trade_route(pother_city, pcity);
1284   }
-verbatim

This check and the fc_assert_*() calls are redundant. The reason for this bug
report was, that the fc_assert_action never executes the action 'continue' ...

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?15498>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


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

Reply via email to