Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13745) savegame crash
Home

[Freeciv-Dev] (PR#13745) savegame crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#13745) savegame crash
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Tue, 23 Aug 2005 01:00:13 -0700
Reply-to: bugs@xxxxxxxxxxx

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

> [per - Tue Aug 23 07:10:56 2005]:
> 
> Forwarding from pubserver crash reports. Got several of these. No idea
> why. - Per
> 
> 
Looks like player->target_government is never initialized, however I
don't know how could it be 127.
This patch initializes the variable.
--
mateusz
Index: common/player.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/player.c,v
retrieving revision 1.157.2.5
diff -u -r1.157.2.5 player.c
--- common/player.c     19 Apr 2005 22:05:57 -0000      1.157.2.5
+++ common/player.c     23 Aug 2005 07:58:35 -0000
@@ -92,6 +92,7 @@
   sz_strlcpy(plr->username, ANON_USER_NAME);
   plr->is_male = TRUE;
   plr->government=game.default_government;
+  plr->target_government = plr->government;
   plr->nation = NO_NATION_SELECTED;
   plr->team = TEAM_NONE;
   plr->is_started = FALSE;

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