diff options
author | Kenichi Handa <handa@m17n.org> | 2006-11-17 12:12:05 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2006-11-17 12:12:05 +0000 |
commit | b1bf186de03c496819719466b4ee23e30f1c4ae3 (patch) | |
tree | b985b2a30ff14727145fd336a82e2e4329a9e622 /src | |
parent | 62186237c1f060de41ffadb9e7b0ba60e11ee988 (diff) | |
download | emacs-b1bf186de03c496819719466b4ee23e30f1c4ae3.tar.gz |
(simple_search): In the loop of backward searching,
check also the byte position against the limit.
Diffstat (limited to 'src')
-rw-r--r-- | src/search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index 7c3151b76b8..d6572c5397a 100644 --- a/src/search.c +++ b/src/search.c @@ -1514,7 +1514,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) int this_len_byte = len_byte; unsigned char *p = pat; - if (pos - len < lim) + if (this_pos < lim || this_pos_byte < lim_byte) goto stop; while (this_len > 0) |