]> git.eshelyaron.com Git - emacs.git/commitdiff
(re_search_2): Fix previous change.
authorKenichi Handa <handa@m17n.org>
Thu, 19 Sep 2002 00:40:09 +0000 (00:40 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 19 Sep 2002 00:40:09 +0000 (00:40 +0000)
src/regex.c

index b2dc4d51df56b28f4f77d88eb711ffe21f684148..a7ded8775153190a5c8c689ca7d1b643b068bcf1 100644 (file)
@@ -4075,15 +4075,16 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
                      }
                }
              else if (multibyte && ! target_multibyte)
-               {
-                 buf_ch = *d;
-                 MAKE_CHAR_MULTIBYTE (buf_ch);
-                 if (fastmap[CHAR_LEADING_CODE (buf_ch)])
-                   break;
+               while (range > lim)
+                 {
+                   buf_ch = *d;
+                   MAKE_CHAR_MULTIBYTE (buf_ch);
+                   if (fastmap[CHAR_LEADING_CODE (buf_ch)])
+                     break;
 
-                 d++;
-                 range--;
-               }
+                   d++;
+                   range--;
+                 }
              else
                while (range > lim && !fastmap[*d])
                  {