Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13701) fix government crash in debug code
Home

[Freeciv-Dev] (PR#13701) fix government crash in debug code

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13701) fix government crash in debug code
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 18 Aug 2005 10:39:37 -0700
Reply-to: bugs@xxxxxxxxxxx

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

As pointed out by Mateusz, this code crashes when compiled with DEBUG...

-jason

Index: client/servers.c
===================================================================
RCS file: client/servers.c
diff -N client/servers.c
Index: client/servers.h
===================================================================
RCS file: client/servers.h
diff -N client/servers.h
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.409
diff -p -u -r1.409 plrhand.c
--- server/plrhand.c    18 Aug 2005 06:44:28 -0000      1.409
+++ server/plrhand.c    18 Aug 2005 17:38:29 -0000
@@ -398,7 +398,9 @@ void update_revolution(struct player *pp
   freelog(LOG_DEBUG, "Update revolution for %s.  Current government %s, "
          "target %s, revofin %d, turn %d.",
          pplayer->name, get_government_name(pplayer->government),
-         get_government_name(pplayer->target_government),
+         pplayer->target_government
+         ? get_government_name(pplayer->target_government)
+         : "(none)",
          pplayer->revolution_finishes, game.info.turn);
   if (pplayer->government == game.government_when_anarchy
       && pplayer->revolution_finishes <= game.info.turn) {

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13701) fix government crash in debug code, Jason Short <=