[Freeciv-Dev] (PR#10120) fc_fprintf before charsets are initialized
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#10120) fc_fprintf before charsets are initialized |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Tue, 14 Sep 2004 21:01:53 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10120 >
Sometimes freelog is called before charsets are initialized. Currently
this causes a segfault. It's easy enough just to not use iconv when
this happens...although it's probably an error that should be fixed by
reordering the function calls.
jason
Index: utility/fciconv.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/utility/fciconv.c,v
retrieving revision 1.4
diff -u -r1.4 fciconv.c
--- utility/fciconv.c 12 Sep 2004 01:31:48 -0000 1.4
+++ utility/fciconv.c 15 Sep 2004 03:59:55 -0000
@@ -300,7 +300,11 @@
my_vsnprintf(string, sizeof(string), format, ap);
va_end(ap);
- output = internal_to_local_string_static(string);
+ if (is_init) {
+ output = internal_to_local_string_static(string);
+ } else {
+ output = string;
+ }
fputs(output, stream);
fflush(stream);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#10120) fc_fprintf before charsets are initialized,
Jason Short <=
|
|