diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index fc50924837ae..9d1887895e30 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1949,7 +1949,7 @@ struct re_guts *g; /* If the character does not exist in the pattern, the jump * is equal to the number of characters in the pattern. */ - for (ch = 0; ch < 256; ch++) + for (ch = 0; ch < (UCHAR_MAX+1); ch++) g->charjump[ch] = g->mlen; /* If the character does exist, compute the jump that would