Follow-up Comment #4, bug #14415 (project freeciv):

> nmod = secfile_lookup_int_default(file, 0,"savefile.num_bases");
... 
> base_order = fc_calloc(nmod + (4 - (nmod % 4)), > sizeof(*base_order));
...
> for (; j < game.control.num_base_types + (4 -
> (game.control.num_base_types % 4)); j++) {
> base_order[j] = NULL;
> } 

There's obvious bug in that memory is allocated based on number of base types
on savegame, but then accessed based on current game.control.num_base_types.
New base types has been added to ruleset...

But as you said, this loop is completely useless anyway so it should be
removed.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to