Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2005:
[Freeciv-Dev] Re: (PR#14586) civclient: government.c:80: get_gov_pplayer
Home

[Freeciv-Dev] Re: (PR#14586) civclient: government.c:80: get_gov_pplayer

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: yautja@xxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14586) civclient: government.c:80: get_gov_pplayer: Assertion
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Nov 2005 15:21:31 -0800
Reply-to: bugs@xxxxxxxxxxx

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

Oops, here's the patch without the garbage.

Index: client/text.c
===================================================================
--- client/text.c       (revision 11238)
+++ client/text.c       (working copy)
@@ -41,14 +41,15 @@
   static struct astring str = ASTRING_INIT;
   int i;
   char output_text[O_MAX][16];
-  struct government *gov;
-  
-  gov = get_gov_pplayer(game.player_ptr);
 
   for (i = 0; i < O_MAX; i++) {
-    int before_penalty = gov->output_before_penalty[i];
+    int before_penalty = 0;
     int x = get_output_tile(ptile, i);
-    
+
+    if (game.player_ptr) {
+      before_penalty = game.player_ptr->government->output_before_penalty[i];
+    }
+
     if (before_penalty > 0 && x > before_penalty) {
       my_snprintf(output_text[i], sizeof(output_text[i]), "%d(-1)", x);
     } else {

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