changeset 1259:3a0bb56adf8e

Fix a major bug in utf8_compare(): when case_sensitive is true, s1_t and s2_t were uninitialized, leading to unpredicable results.
author zas_
date Mon, 26 Jan 2009 08:30:30 +0000
parents d849edec5bc9
children 51dec1b35246
files src/misc.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc.c	Sun Jan 25 19:38:31 2009 +0000
+++ b/src/misc.c	Mon Jan 26 08:30:30 2009 +0000
@@ -44,6 +44,11 @@
 		s1_t = g_utf8_casefold(s1, -1);
 		s2_t = g_utf8_casefold(s2, -1);
 		}
+	else
+		{
+		s1_t = (gchar *) s1;
+		s2_t = (gchar *) s2;
+		}
 
 	s1_key = g_utf8_collate_key(s1_t, -1);
 	s2_key = g_utf8_collate_key(s2_t, -1);