Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2271) Re: GTK2 segfault in put_conv
Home

[Freeciv-Dev] Re: (PR#2271) Re: GTK2 segfault in put_conv

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#2271) Re: GTK2 segfault in put_conv
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 6 Nov 2002 02:07:08 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Jason Short via RT wrote:
> incoming wrote:
> 
> 
>>I'm running under GTK2.  The eye candy patch is applied (but the only 
>>modifications it makes are in client/tilespec.[ch]).
>>
>>I've been quitting and restarting the client a number of times to test 
>>things out.  I've noticed that each time I do so, a turn passes.  (Side 
>>note: is this a bug or a feature?  Sounds like a bug to me.)
>>
>>Then one time I actually hit "turn done" (for the first time, I think). 
>>  Bam!
> 
> 
> Look, and it's even reproducable...
> 
> Saved game attached.  Just connect and hit "turn done".  I haven't tried 
> this with any other clients.

Um, that was a waste of bandwidth.  Apparently the bug is more than 
merely "reproducable".

jason

? client/gui-gtk-2.0/diff
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
retrieving revision 1.30
diff -u -r1.30 gui_main.c
--- client/gui-gtk-2.0/gui_main.c       2002/11/03 18:40:58     1.30
+++ client/gui-gtk-2.0/gui_main.c       2002/11/06 10:05:26
@@ -175,7 +175,7 @@
     g_convert(src, -1, network_charset, "UTF-8", NULL, &len, NULL);
 
   if (out) {
-    unsigned char *dst = fc_malloc(len);
+    unsigned char *dst = fc_malloc(len + 1);
 
     memcpy(dst, out, len);
     g_free(out);

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