X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffnmatch_loop.c;h=8cd444404a9d6f02c70c5851f1f89615f80569ec;hb=14b6d70139486b63e66257aad1abe2a9615f4d96;hp=bb24904ded0ad6c4b9e30d127b9bb556b0d28c25;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/lib/fnmatch_loop.c b/lib/fnmatch_loop.c index bb24904de..8cd444404 100644 --- a/lib/fnmatch_loop.c +++ b/lib/fnmatch_loop.c @@ -382,15 +382,20 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, /* We found a table entry. Now see whether the character we are currently at has the same equivalance class value. */ - int len = weights[idx]; + int len = weights[idx & 0xffffff]; int32_t idx2; const UCHAR *np = (const UCHAR *) n; idx2 = findidx (&np); - if (idx2 != 0 && len == weights[idx2]) + if (idx2 != 0 + && (idx >> 24) == (idx2 >> 24) + && len == weights[idx2 & 0xffffff]) { int cnt = 0; + idx &= 0xffffff; + idx2 &= 0xffffff; + while (cnt < len && (weights[idx + 1 + cnt] == weights[idx2 + 1 + cnt]))