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

On 14/09/2007, Marko Lindqvist  wrote:
>
>  Seems that trunk already had proper player->nation zeroing before
> S2_1 bugfix was ported.
>
>  To be committed to S2_2 and trunk.

 - Fixed compiler warning


 - ML

diff -Nurd -X.diff_ignore freeciv/client/packhand.c freeciv/client/packhand.c
--- freeciv/client/packhand.c	2007-09-14 14:52:09.000000000 +0300
+++ freeciv/client/packhand.c	2007-09-19 13:55:57.000000000 +0300
@@ -2190,8 +2190,6 @@
 **************************************************************************/
 void handle_ruleset_control(struct packet_ruleset_control *packet)
 {
-  int i;
-
   ruleset_data_free();
 
   ruleset_cache_init();
@@ -2226,12 +2224,6 @@
   nations_alloc(game.control.nation_count);
   city_styles_alloc(game.control.styles_count);
 
-  /* We are in inconsistent state. Players point to nations,
-   * which do not point to players. Fix */
-  for (i = 0; i < MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS; i++) {
-    game.players[i].nation = NULL;
-  }
-
   /* After nation ruleset free/alloc, nation->player pointers are NULL.
    * We have to initialize player->nation too, to keep state consistent. */ 
   players_iterate(pplayer) {
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to