Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] (PR#13405) getting intelligence on civil war generated sta
Home

[Freeciv-Dev] (PR#13405) getting intelligence on civil war generated sta

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sanedragon@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#13405) getting intelligence on civil war generated state crashes gui-xaw
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Tue, 5 Jul 2005 00:26:58 -0700
Reply-to: bugs@xxxxxxxxxxx

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

And the patch.

total_bulbs_required() cannot be called on A_NOINFO anymore.
--
mateusz
Index: client/gui-xaw/inteldlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-xaw/inteldlg.c,v
retrieving revision 1.28
diff -u -r1.28 inteldlg.c
--- client/gui-xaw/inteldlg.c   21 Jun 2005 16:21:01 -0000      1.28
+++ client/gui-xaw/inteldlg.c   5 Jul 2005 07:24:57 -0000
@@ -239,11 +239,10 @@
                          XtNlabel, buf,
                          NULL);
 
-  if (get_player_research(pdialog->pplayer)->researching == A_UNSET) {
-    my_snprintf(buf, sizeof(buf), _("Researching: %s(%d/%d)"),
-               advances[A_NONE].name,
-               get_player_research(pdialog->pplayer)->bulbs_researched,
-               total_bulbs_required(pdialog->pplayer));
+  if (get_player_research(pdialog->pplayer)->researching == A_UNSET
+      || get_player_research(pdialog->pplayer)->researching == A_NOINFO) {
+    my_snprintf(buf, sizeof(buf), _("Researching: Unknown(%d/-)"),
+               get_player_research(pdialog->pplayer)->bulbs_researched);
   } else {
     my_snprintf(buf, sizeof(buf), _("Researching: %s(%d/%d)"),
                get_tech_name(pdialog->pplayer,

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