Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#10838) Research points carry over from one game to the
Home

[Freeciv-Dev] (PR#10838) Research points carry over from one game to the

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ggracian@xxxxxxx, saywhat@xxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#10838) Research points carry over from one game to the next
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Fri, 25 Mar 2005 00:13:30 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [cazfi - Mon Mar 21 19:40:29 2005]:
> 
> 
>   server_game_free() calls game_free() before clean_players_research(). 
> game_free() sets game.nplayers to zero, and clean_players_research() 
> tries to iterate over game.nplayers players.
> 
> 
>   - ML
> 
Ok. Here's a patch.

However the original report was for beta2 and I can't reproduce it.
--
mateusz
diff -ur -Xfreeciv/diff_ignore freeciv/common/game.c changed/common/game.c
--- freeciv/common/game.c       2005-03-22 12:37:04.000000000 +0100
+++ changed/common/game.c       2005-03-22 12:38:45.000000000 +0100
@@ -330,6 +330,7 @@
 ***************************************************************/
 void game_free(void)
 {
+  clean_players_research();
   game_remove_all_players();
   map_free();
   idex_free();
diff -ur -Xfreeciv/diff_ignore freeciv/server/srv_main.c 
changed/server/srv_main.c
--- freeciv/server/srv_main.c   2005-03-18 21:22:23.000000000 +0100
+++ changed/server/srv_main.c   2005-03-22 12:38:38.000000000 +0100
@@ -1948,5 +1948,4 @@
   game_free();
   ruleset_cache_free();
   BV_CLR_ALL(srvarg.draw);
-  clean_players_research();
 }

[Prev in Thread] Current Thread [Next in Thread]