]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/search.c (boyer_moore): Take unibyte characters from pattern
authorAndreas Schwab <schwab@linux-m68k.org>
Wed, 7 Sep 2011 16:48:37 +0000 (18:48 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Wed, 7 Sep 2011 16:48:37 +0000 (18:48 +0200)
literally.  (Bug#9458)

src/ChangeLog
src/search.c

index 6c8f5a9305a9b902e1071dfa8434a9e3fdc59fae..52f41c4cd7361012e0316ccf9b96f5076681cbf8 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-07  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * search.c (boyer_moore): Take unibyte characters from pattern
+       literally.  (Bug#9458)
+
 2011-08-30  Chong Yidong  <cyd@stupidchicken.com>
 
        * syntax.c (find_defun_start): Update all cache variables if
index 738ddf725af4f840ba5efecadbaac70b9d84977a..8f042550af83506be9280dc027373304e42f5f58 100644 (file)
@@ -1837,7 +1837,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
                ch = -1;
            }
 
-         if (ch >= 0200)
+         if (ch >= 0200 && multibyte)
            j = (ch & 0x3F) | 0200;
          else
            j = *ptr;
@@ -1856,7 +1856,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
              while (1)
                {
                  TRANSLATE (ch, inverse_trt, ch);
-                 if (ch >= 0200)
+                 if (ch >= 0200 && multibyte)
                    j = (ch & 0x3F) | 0200;
                  else
                    j = ch;