[glib] Fix a case conversion bug



commit 0fd14b1a56085d59fcb2619dd5071d854997e4d7
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Nov 21 00:27:25 2011 -0500

    Fix a case conversion bug
    
    For titlecase chars without uppercase variant, we were returning
    0, contrary to the docs.

 glib/guniprop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/glib/guniprop.c b/glib/guniprop.c
index 2879a80..c099256 100644
--- a/glib/guniprop.c
+++ b/glib/guniprop.c
@@ -603,7 +603,7 @@ g_unichar_toupper (gunichar c)
       for (i = 0; i < G_N_ELEMENTS (title_table); ++i)
 	{
 	  if (title_table[i][0] == c)
-	    return title_table[i][1];
+	    return title_table[i][1] ? title_table[i][1] : c;
 	}
     }
   return c;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]