changeset 74274:be621902e3fc

(regex_compile): Don't call SET_LIST_BIT with a multibyte character.
author Kenichi Handa <handa@m17n.org>
date Tue, 28 Nov 2006 01:10:09 +0000
parents abd967bf92f7
children 7b6663d9bca0
files src/regex.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Mon Nov 27 22:39:12 2006 +0000
+++ b/src/regex.c	Tue Nov 28 01:10:09 2006 +0000
@@ -2939,7 +2939,8 @@
                         for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
 			  {
 			    int translated = TRANSLATE (ch);
-			    if (re_iswctype (btowc (ch), cc))
+			    if (translate < 1 << BYTEWIDTH
+				&& re_iswctype (btowc (ch), cc))
 			      SET_LIST_BIT (translated);
 			  }