Mercurial > emacs
changeset 88463:656d99c0c155
(boyer_moore): Fix handling of mulitbyte character translation.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 07 May 2002 12:46:21 +0000 |
parents | 0a2b7a261e66 |
children | 2885ae07eac4 |
files | src/search.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c Tue May 07 12:46:06 2002 +0000 +++ b/src/search.c Tue May 07 12:46:21 2002 +0000 @@ -1639,8 +1639,9 @@ this_translated = 0; } - if (ch > 0400) - j = ((unsigned char) ch) | 0200; + if (this_translated + && ch >= 0200) + j = (ch & 0x3F) | 0200; else j = (unsigned char) ch; @@ -1657,8 +1658,8 @@ while (1) { TRANSLATE (ch, inverse_trt, ch); - if (ch > 0400) - j = ((unsigned char) ch) | 0200; + if (ch > 0200) + j = (ch & 0x3F) | 0200; else j = (unsigned char) ch;