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

> [EMAIL PROTECTED] - Sa 10. Mär 2007, 23:19:11]:
> 
>  Attached patch splits event type descriptions to two parts. So you
> will translate "City" and "Famine", which is then displayed as "City:
> Famine" ("%s: %s" is *not* translatable). If description has only one
> part, it will be displayed without any further adjustments.
> 
>  I'm not exactly sure this is an improvement, but if nobody complains
> - or comes out with better solution - I will commit this to trunk, but
> to trunk only.
> 
> 

Here's a small fix to the committed patch. The allocated text buffer
left no room for the '\0' character, which caused random crashes at
client start. 

Index: common/events.c
===================================================================
--- common/events.c	(Revision 12853)
+++ common/events.c	(Arbeitskopie)
@@ -256,7 +256,7 @@
     if (events[i].section_orig) {
       events[i].full_descr = fc_malloc(strlen(_(events[i].descr_orig))
                                        + strlen(_(events[i].section_orig))
-                                       + strlen(": "));
+                                       + strlen(": ") + 1);
       sprintf(events[i].full_descr, "%s: %s",
               _(events[i].section_orig),
               _(events[i].descr_orig));
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to