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

> [EMAIL PROTECTED] - Di 20. Feb 2007, 10:47:47]:
> 
> It happens right after start of new game. I have reproduced it on two  
> computers (on work and houses)
> 
> 20.02.07 в 12:18 Christian Prochaska в своём письме писал(а):
> 
> >
> > <URL: http://bugs.freeciv.org/Ticket/Display.html?id=36441 >
> >
> >> [EMAIL PROTECTED] - Di 20. Feb 2007, 09:08:35]:
> >>
> >> The game simply fall in windows without any messages.
> >>
> >> This bug reproduced in Freeciv-2.0.9-win32-gtk2-setup.exe and
> >> Freeciv-2.1.0-beta3-win32-gtk2-setup.exe.
> >>
> >> Win XP + SP2
> >>
> >
> > I couldn't reproduce the crash. Did it happen after starting a new game
> > or did you load a saved game?
> >
> >
> 

Ok, found the bug. The crash occurs when playing with the russian locale
and the reason is that the text of the last column header needs 77 bytes
of memory while only 64 bytes are allocated for the buffer. The attached
patch increases the size of this particular buffer to 128 bytes. 

Index: client/gui-gtk-2.0/cityrep.c
===================================================================
--- client/gui-gtk-2.0/cityrep.c	(revision 12680)
+++ client/gui-gtk-2.0/cityrep.c	(working copy)
@@ -772,7 +772,7 @@
 static void create_city_report_dialog(bool make_modal)
 {
   static char *titles [NUM_CREPORT_COLS];
-  static char  buf    [NUM_CREPORT_COLS][64];
+  static char  buf    [NUM_CREPORT_COLS][128];
   struct city_report_spec *spec;
 
   GtkWidget *w, *sw, *menubar;

PNG image

Index: client/gui-gtk-2.0/cityrep.c
===================================================================
--- client/gui-gtk-2.0/cityrep.c	(revision 12680)
+++ client/gui-gtk-2.0/cityrep.c	(working copy)
@@ -777,7 +777,7 @@
 static void create_city_report_dialog(bool make_modal)
 {
   static char **titles;
-  static char (*buf)[64];
+  static char (*buf)[128];
   struct city_report_spec *spec;
 
   GtkWidget *w, *sw, *menubar;
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to