Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] (PR#12872) Client Factory Help-Text Crash
Home

[Freeciv-Dev] (PR#12872) Client Factory Help-Text Crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: badamson@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12872) Client Factory Help-Text Crash
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Apr 2005 21:16:07 -0700
Reply-to: bugs@xxxxxxxxxxx

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

This bug is a bit bizarre.  This patch fixes it and another problem with
insert_allows.

-jason

? data/mom
? data/mom.serv
Index: client/helpdata.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/helpdata.c,v
retrieving revision 1.105
diff -u -r1.105 helpdata.c
--- client/helpdata.c   21 Apr 2005 22:53:12 -0000      1.105
+++ client/helpdata.c   23 Apr 2005 04:09:27 -0000
@@ -230,7 +230,8 @@
        for (r2 = 0; r2 < MAX_NUM_REQS; r2++) {
          struct requirement *coreq = building->req + r2;
 
-         if (!are_req_sources_equal(psource, &coreq->source)) {
+         if (coreq->source.type != REQ_NONE
+             && !are_req_sources_equal(psource, &coreq->source)) {
            char buf2[512];
 
            COREQ_APPEND(get_req_source_text(&coreq->source,
Index: common/packets.def
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.def,v
retrieving revision 1.107
diff -u -r1.107 packets.def
--- common/packets.def  21 Apr 2005 00:28:27 -0000      1.107
+++ common/packets.def  23 Apr 2005 04:09:27 -0000
@@ -1149,7 +1149,7 @@
   STRING graphic_alt[MAX_LEN_NAME];
   UINT8 req_type[MAX_NUM_REQS];
   UINT8 req_range[MAX_NUM_REQS];
-  UINT8 req_value[MAX_NUM_REQS];
+  UINT32 req_value[MAX_NUM_REQS];
   BOOL req_survives[MAX_NUM_REQS];
   TECH obsolete_by;
   IMPROVEMENT replaced_by;

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