Index: lib/libc/locale/collate.c =================================================================== --- lib/libc/locale/collate.c (revision 302323) +++ lib/libc/locale/collate.c (working copy) @@ -310,7 +310,7 @@ if ((sptr = *state) != NULL) { *pri = *sptr; sptr++; - if ((sptr == *state) || (sptr == NULL)) + if ((sptr == *state) || (*sptr == 0)) *state = NULL; else *state = sptr;