diff --git a/ChangeLog b/ChangeLog index c471f7cef..82428cf9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-05-19 Noah Levitt + + * glib/gunidecomp.c: Fix off-by-one error in + g_unicode_canonical_ordering (bug #113260). + 2003-05-05 Matthias Clasen * glib/gstrfuncs.c (g_ascii_dtostr): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c471f7cef..82428cf9c 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2003-05-19 Noah Levitt + + * glib/gunidecomp.c: Fix off-by-one error in + g_unicode_canonical_ordering (bug #113260). + 2003-05-05 Matthias Clasen * glib/gstrfuncs.c (g_ascii_dtostr): diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index c471f7cef..82428cf9c 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2003-05-19 Noah Levitt + + * glib/gunidecomp.c: Fix off-by-one error in + g_unicode_canonical_ordering (bug #113260). + 2003-05-05 Matthias Clasen * glib/gstrfuncs.c (g_ascii_dtostr): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c471f7cef..82428cf9c 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2003-05-19 Noah Levitt + + * glib/gunidecomp.c: Fix off-by-one error in + g_unicode_canonical_ordering (bug #113260). + 2003-05-05 Matthias Clasen * glib/gstrfuncs.c (g_ascii_dtostr): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c471f7cef..82428cf9c 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2003-05-19 Noah Levitt + + * glib/gunidecomp.c: Fix off-by-one error in + g_unicode_canonical_ordering (bug #113260). + 2003-05-05 Matthias Clasen * glib/gstrfuncs.c (g_ascii_dtostr): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c471f7cef..82428cf9c 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2003-05-19 Noah Levitt + + * glib/gunidecomp.c: Fix off-by-one error in + g_unicode_canonical_ordering (bug #113260). + 2003-05-05 Matthias Clasen * glib/gstrfuncs.c (g_ascii_dtostr): diff --git a/glib/gunidecomp.c b/glib/gunidecomp.c index 5c6fc3d7a..357fdd3f9 100644 --- a/glib/gunidecomp.c +++ b/glib/gunidecomp.c @@ -65,14 +65,14 @@ g_unicode_canonical_ordering (gunichar *string, { gsize j; /* Percolate item leftward through string. */ - for (j = i; j > 0; --j) + for (j = i + 1; j > 0; --j) { gunichar t; - if (COMBINING_CLASS (string[j]) <= next) + if (COMBINING_CLASS (string[j - 1]) <= next) break; - t = string[j + 1]; - string[j + 1] = string[j]; - string[j] = t; + t = string[j]; + string[j] = string[j - 1]; + string[j - 1] = t; swap = 1; } /* We're re-entering the loop looking at the old