Fix off-by-one error in g_unicode_canonical_ordering (bug #113260).
authorNoah Levitt <nlevitt@columbia.edu>
Mon, 19 May 2003 15:54:48 +0000 (15:54 +0000)
committerNoah Levitt <nlevitt@src.gnome.org>
Mon, 19 May 2003 15:54:48 +0000 (15:54 +0000)
2003-05-19  Noah Levitt  <nlevitt@columbia.edu>

* glib/gunidecomp.c: Fix off-by-one error in
g_unicode_canonical_ordering (bug #113260).

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gunidecomp.c

index 22031c4..a44d97f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-19  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/gunidecomp.c: Fix off-by-one error in
+       g_unicode_canonical_ordering (bug #113260).
+
 2003-05-19 Arafat Medini <lumina@silverpen.de>
 
        * ar.po: Added ar to ALL_LINGUAS
index 22031c4..a44d97f 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/gunidecomp.c: Fix off-by-one error in
+       g_unicode_canonical_ordering (bug #113260).
+
 2003-05-19 Arafat Medini <lumina@silverpen.de>
 
        * ar.po: Added ar to ALL_LINGUAS
index 22031c4..a44d97f 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/gunidecomp.c: Fix off-by-one error in
+       g_unicode_canonical_ordering (bug #113260).
+
 2003-05-19 Arafat Medini <lumina@silverpen.de>
 
        * ar.po: Added ar to ALL_LINGUAS
index 22031c4..a44d97f 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/gunidecomp.c: Fix off-by-one error in
+       g_unicode_canonical_ordering (bug #113260).
+
 2003-05-19 Arafat Medini <lumina@silverpen.de>
 
        * ar.po: Added ar to ALL_LINGUAS
index 22031c4..a44d97f 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/gunidecomp.c: Fix off-by-one error in
+       g_unicode_canonical_ordering (bug #113260).
+
 2003-05-19 Arafat Medini <lumina@silverpen.de>
 
        * ar.po: Added ar to ALL_LINGUAS
index 22031c4..a44d97f 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-19  Noah Levitt  <nlevitt@columbia.edu>
+
+       * glib/gunidecomp.c: Fix off-by-one error in
+       g_unicode_canonical_ordering (bug #113260).
+
 2003-05-19 Arafat Medini <lumina@silverpen.de>
 
        * ar.po: Added ar to ALL_LINGUAS
index a2211e1..0d73bd5 100644 (file)
@@ -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