libc/collcmp: Fix initialization of s2
authorJohn Marino <draco@marino.st>
Fri, 31 Jul 2015 11:23:18 +0000 (13:23 +0200)
committerJohn Marino <draco@marino.st>
Fri, 31 Jul 2015 11:23:18 +0000 (13:23 +0200)
lib/libc/locale/collcmp.c

index a73d782..098c9f7 100644 (file)
@@ -48,7 +48,7 @@ int __collate_range_cmp(struct xlocale_collate *table, wchar_t c1, wchar_t c2)
        s1[0] = c1;
        s1[1] = 0;
        s2[0] = c2;
-       s2[0] = 0;
+       s2[1] = 0;
        struct _xlocale l = {{0}};
        l.components[XLC_COLLATE] = (struct xlocale_component *)table;
        return (wcscoll_l(s1, s2, &l));