aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regex.c b/src/regex.c
index 32991346399..7967a481ae9 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -2939,7 +2939,8 @@ regex_compile (pattern, size, syntax, bufp)
2939 for (ch = 0; ch < 1 << BYTEWIDTH; ++ch) 2939 for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
2940 { 2940 {
2941 int translated = TRANSLATE (ch); 2941 int translated = TRANSLATE (ch);
2942 if (re_iswctype (btowc (ch), cc)) 2942 if (translate < 1 << BYTEWIDTH
2943 && re_iswctype (btowc (ch), cc))
2943 SET_LIST_BIT (translated); 2944 SET_LIST_BIT (translated);
2944 } 2945 }
2945 2946