Mercurial > hg > xemacs-beta
diff src/search.c @ 4904:e91e3e353805
Don't compare the same octet with itself if checking for boyer_moore_ok
src/ChangeLog addition:
2010-01-31 Aidan Kehoe <kehoea@parhasard.net>
* search.c (search_buffer):
When checking the octets of c for identity, don't compare the
same octet with itself. Thank you Ben Wing!
tests/ChangeLog addition:
2010-01-31 Aidan Kehoe <kehoea@parhasard.net>
* automated/search-tests.el:
Check that multidimensional characters with repeated octets and
case information force simple_search(), since boyer_moore()
doesn't understand them when constructing its stride table.
In passing; correct my spelling.
* automated/case-tests.el (uni-mappings):
In passing; delete a couple of redundant tests, correct the logic
of another.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 31 Jan 2010 18:09:57 +0000 |
parents | 7504864a986c |
children | e813cf16c015 |
line wrap: on
line diff
--- a/src/search.c Sat Jan 30 20:34:23 2010 -0600 +++ b/src/search.c Sun Jan 31 18:09:57 2010 +0000 @@ -1441,7 +1441,7 @@ int i, j; for (i = 0; i < len && boyer_moore_ok; ++i) { - for (j = 0; i < len && boyer_moore_ok; ++j) + for (j = i + 1; j < len && boyer_moore_ok; ++j) { if (encoded[i] == encoded[j]) {