changeset 89116:e822de57aa31

(re_search_2): Fix previous change.
author Kenichi Handa <handa@m17n.org>
date Thu, 19 Sep 2002 00:40:09 +0000
parents 8a16a3183d89
children 39a217f682b4
files src/regex.c
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/regex.c	Thu Sep 19 00:39:45 2002 +0000
+++ b/src/regex.c	Thu Sep 19 00:40:09 2002 +0000
@@ -4075,15 +4075,16 @@
 		      }
 		}
 	      else if (multibyte && ! target_multibyte)
-		{
-		  buf_ch = *d;
-		  MAKE_CHAR_MULTIBYTE (buf_ch);
-		  if (fastmap[CHAR_LEADING_CODE (buf_ch)])
-		    break;
-
-		  d++;
-		  range--;
-		}
+		while (range > lim)
+		  {
+		    buf_ch = *d;
+		    MAKE_CHAR_MULTIBYTE (buf_ch);
+		    if (fastmap[CHAR_LEADING_CODE (buf_ch)])
+		      break;
+
+		    d++;
+		    range--;
+		  }
 	      else
 		while (range > lim && !fastmap[*d])
 		  {