diff options
| author | Andreas Schwab | 2011-09-07 18:48:37 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2011-09-07 18:48:37 +0200 |
| commit | edb7b4dc8b089385d8b0d12081227fc416fae23e (patch) | |
| tree | bf0462e9bdec371f166b2012220d4f5f06d0ae28 /src | |
| parent | 6e20a0d47c053a9524edfc6af390bf1e562a5020 (diff) | |
| download | emacs-edb7b4dc8b089385d8b0d12081227fc416fae23e.tar.gz emacs-edb7b4dc8b089385d8b0d12081227fc416fae23e.zip | |
* src/search.c (boyer_moore): Take unibyte characters from pattern
literally. (Bug#9458)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/search.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6c8f5a9305a..52f41c4cd73 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-07 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * search.c (boyer_moore): Take unibyte characters from pattern | ||
| 4 | literally. (Bug#9458) | ||
| 5 | |||
| 1 | 2011-08-30 Chong Yidong <cyd@stupidchicken.com> | 6 | 2011-08-30 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 7 | ||
| 3 | * syntax.c (find_defun_start): Update all cache variables if | 8 | * syntax.c (find_defun_start): Update all cache variables if |
diff --git a/src/search.c b/src/search.c index 738ddf725af..8f042550af8 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1837,7 +1837,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 1837 | ch = -1; | 1837 | ch = -1; |
| 1838 | } | 1838 | } |
| 1839 | 1839 | ||
| 1840 | if (ch >= 0200) | 1840 | if (ch >= 0200 && multibyte) |
| 1841 | j = (ch & 0x3F) | 0200; | 1841 | j = (ch & 0x3F) | 0200; |
| 1842 | else | 1842 | else |
| 1843 | j = *ptr; | 1843 | j = *ptr; |
| @@ -1856,7 +1856,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, | |||
| 1856 | while (1) | 1856 | while (1) |
| 1857 | { | 1857 | { |
| 1858 | TRANSLATE (ch, inverse_trt, ch); | 1858 | TRANSLATE (ch, inverse_trt, ch); |
| 1859 | if (ch >= 0200) | 1859 | if (ch >= 0200 && multibyte) |
| 1860 | j = (ch & 0x3F) | 0200; | 1860 | j = (ch & 0x3F) | 0200; |
| 1861 | else | 1861 | else |
| 1862 | j = ch; | 1862 | j = ch; |