projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix gnulib-tool sed script de-commentation for AIX sed.
[gnulib.git]
/
lib
/
fnmatch_loop.c
diff --git
a/lib/fnmatch_loop.c
b/lib/fnmatch_loop.c
index
bb24904
..
8cd4444
100644
(file)
--- 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. */
/* 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);
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;
{
int cnt = 0;
+ idx &= 0xffffff;
+ idx2 &= 0xffffff;
+
while (cnt < len
&& (weights[idx + 1 + cnt]
== weights[idx2 + 1 + cnt]))
while (cnt < len
&& (weights[idx + 1 + cnt]
== weights[idx2 + 1 + cnt]))