]> hydra-www.ietfng.org Git - gtetrinet/commitdiff
Patch from Robert Cheramy to fix locale segfaults.
authorJordi Mallach <jordim@src.gnome.org>
Mon, 17 Mar 2003 11:02:40 +0000 (11:02 +0000)
committerJordi Mallach <jordim@src.gnome.org>
Mon, 17 Mar 2003 11:02:40 +0000 (11:02 +0000)
Doc updates.

AUTHORS
ChangeLog
README
TODO
src/fields.c
src/partyline.c

diff --git a/AUTHORS b/AUTHORS
index 8ac3d0da470831c52f482d7c2708ab32fdd58c24..bfc6f28388ad83d94ae683d00e228d5fb83b03e1 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -18,3 +18,4 @@ James Antill
 Steve Kemp
 Gerfried Fuchs
 Dani Carbonell
+Christian Hammond
index bb1302c1ec1fab347bf1ba2697b5d3c16ced8122..2d84dfd06f7d9c8d50cfdd6acbe3f40190d6f741 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-03-17  Jordi Mallach  <jordi@sindominio.net>
+
+       * src/fields.c (gmsginput_activate): Patch from Robert Cheramy, to
+       workaround segfaults when trying to input characters not supported
+       by the current locale.
+       * src/partyline.c (textentry): Likewise.
+
+       * AUTHORS, TODO: Updated.
+       * README: Changed contact address.
+
 2003-03-17  Jordi Mallach  <jordi@sindominio.net>
 
        * configure.in (ALL_LINGUAS): Added "ru" (Russian).
diff --git a/README b/README
index 6c70934823a6396fab057994898111eddd0e397a..d3a61b1a581bf3655fe292780438a04e96c58608 100644 (file)
--- a/README
+++ b/README
@@ -35,4 +35,4 @@ The GTetrinet homepage is at
 
 http://gtetrinet.sourceforge.net/
 
-E-Mail suggestions, bug reports, etc to kswong@zip.com.au
+E-Mail suggestions, bug reports, etc. to gtetrinet-list@gnome.org.
diff --git a/TODO b/TODO
index 335b90fff6cd51932e570db5878caaca31808ddb..2077d78460d56063720bc44df7003b6e0214f3ee 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,10 +3,6 @@ GTetrinet's TODO list
 
 - Get server list from http://www.tetrinet.org/ip/ (see #104323)
 
-- GNOME2 port issues:
-  + detaching and reattaching the Menu Bar causes two Bonobo-CRITICAL
-  + if you use the C locale and input an 8bit character, gtetrinet segfaults
-
 - Make gtetrinet resizeable (at least the fields messages bit)
 
 - Hide mouse cursor when game is in progress
index 7fe8c0345f881a368e5733bd016bcedbb645bbb1..62b9852de719ed4fafa8dc9c17b98e4a5e228060 100644 (file)
@@ -604,6 +604,8 @@ void gmsginput_activate (void)
             /* post /me thingy */
             g_snprintf (buf, sizeof(buf), "* %s %s", nick, s+4);
             locale_s = g_locale_from_utf8 (buf, -1, NULL, NULL, NULL);
+                       /* FIXME : if there is an error while converting from UTF8 to current locale, we ignore the message */
+                       if (locale_s == NULL) return;
             client_outmessage (OUT_GMSG, locale_s);
             g_free (locale_s);
         }
@@ -611,6 +613,8 @@ void gmsginput_activate (void)
             /* post message */
             g_snprintf (buf, sizeof(buf), "<%s> %s", nick, s);
             locale_s = g_locale_from_utf8 (buf, -1, NULL, NULL, NULL);
+                       /* FIXME : if there is an error while converting from UTF8 to current locale, we ignore the message */
+                       if (locale_s == NULL) return;
             client_outmessage (OUT_GMSG, locale_s);
             g_free (locale_s);
         }
index 1f8ade6b3526a257b15f2db1abf162522b5f835d..df2f224526884ad8bf883c408105492ae90d23b0 100644 (file)
@@ -331,6 +331,9 @@ void textentry (GtkWidget *widget)
     /* convert from UTF-8 to the current locale, will work with ISO8859-1 locales */    
     iso_text = g_locale_from_utf8 (text, -1, NULL, NULL, NULL);
 
+       /* FIXME : if there is an error while converting from UTF8 to current locale, we ignore the message */
+       if (iso_text == NULL) return;
+
     tetrinet_playerline (iso_text);
     GTET_O_STRCPY (plhistory[plh_end], iso_text);
     gtk_entry_set_text (GTK_ENTRY(widget), "");