Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6445) uninitialized data in unit_info packet
Home

[Freeciv-Dev] (PR#6445) uninitialized data in unit_info packet

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6445) uninitialized data in unit_info packet
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 8 Oct 2003 18:22:48 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Might as well initialize the fields of the packet...

jason

Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.177
diff -u -r1.177 civclient.c
--- client/civclient.c  2003/09/15 19:40:52     1.177
+++ client/civclient.c  2003/10/09 01:21:55
@@ -548,6 +548,7 @@
    * network.  Note we could just use memset instead.  They're set
    * above the applicable fields for safety.
    */
+  info.done_moving = punit->done_moving;
   info.carried = FALSE;
   info.ai = FALSE;
   info.paradropped = FALSE;
@@ -568,6 +569,7 @@
   info.x=punit->x;
   info.y=punit->y;
   info.homecity=punit->homecity;
+  info.occupy = punit->occupy;
   info.veteran=punit->veteran;
   info.type=punit->type;
   info.movesleft=punit->moves_left;

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6445) uninitialized data in unit_info packet, Jason Short <=