aboutsummaryrefslogtreecommitdiffstats
path: root/src/regex.c
diff options
context:
space:
mode:
authorKenichi Handa2006-11-28 01:10:42 +0000
committerKenichi Handa2006-11-28 01:10:42 +0000
commit6358f8b2bf2f524f5682bea945e4f7f70a4ecfa4 (patch)
tree7b0a43fd78c2100c5d5ded45f621639021f4812b /src/regex.c
parent2b8d8474557367bf962009d5d0ae19663ea4f30b (diff)
downloademacs-6358f8b2bf2f524f5682bea945e4f7f70a4ecfa4.tar.gz
emacs-6358f8b2bf2f524f5682bea945e4f7f70a4ecfa4.zip
(regex_compile): Don't call SET_LIST_BIT with a
multibyte character.
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