Skip to content

Commit

Permalink
Fix a major bug in utf8_compare(): when case_sensitive is true, s1_t …
Browse files Browse the repository at this point in the history
…and s2_t were uninitialized, leading to unpredicable results.
  • Loading branch information
Laurent Monin committed Jan 26, 2009
1 parent d80efe4 commit a24c1c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ gint utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive)
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);
Expand Down

0 comments on commit a24c1c6

Please sign in to comment.