[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]
<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();
}
|
|