Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] Re: (PR#9470) Bug: Received value isn't boolean: 99
Home

[Freeciv-Dev] Re: (PR#9470) Bug: Received value isn't boolean: 99

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: brett.albertson@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#9470) Bug: Received value isn't boolean: 99
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 21 Jul 2004 12:44:00 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9470 >

Brett Albertson wrote:

> I'm 100% certain that they are both from the current CVS as of a few
> hours ago.

But I bet you're using a savegame from before, right?

Client "attributes" are incredibly ugly.  But I think this should fix it.

jason

Index: client/agents/cma_core.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_core.c,v
retrieving revision 1.58
diff -u -r1.58 cma_core.c
--- client/agents/cma_core.c    20 Jul 2004 16:27:07 -0000      1.58
+++ client/agents/cma_core.c    21 Jul 2004 19:39:04 -0000
@@ -562,7 +562,7 @@
   size_t len;
   char buffer[SAVED_PARAMETER_SIZE];
   struct data_in din;
-  int i, version;
+  int i, version, dummy;
 
   len = attr_city_get(attr, city_id, sizeof(buffer), buffer);
   if (len == 0) {
@@ -581,6 +581,7 @@
   }
 
   dio_get_sint16(&din, &parameter->happy_factor);
+  dio_get_uint8(&din, &dummy); /* Dummy value; used to be factor_target. */
   dio_get_bool8(&din, &parameter->require_happy);
   /* These options are only for server-AI use. */
   parameter->allow_disorder = FALSE;
@@ -609,6 +610,7 @@
   }
 
   dio_put_sint16(&dout, parameter->happy_factor);
+  dio_put_uint8(&din, 0); /* Dummy value; used to be factor_target. */
   dio_put_bool8(&dout, parameter->require_happy);
 
   assert(dio_output_used(&dout) == SAVED_PARAMETER_SIZE);

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