diff options
| author | Kenichi Handa | 2006-11-30 00:41:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-11-30 00:41:33 +0000 |
| commit | 3dcf00668c2ed1ca2d9591f7d6ac827400273c3f (patch) | |
| tree | 20abe3c98decefeaf59ade432a2ccdd469e317f6 | |
| parent | 7faa8095342cd1b16f6d95d20cd27136789b755e (diff) | |
| download | emacs-3dcf00668c2ed1ca2d9591f7d6ac827400273c3f.tar.gz emacs-3dcf00668c2ed1ca2d9591f7d6ac827400273c3f.zip | |
(simple_search): Fix previous change.
| -rw-r--r-- | src/search.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c index ce4d1828585..9aa49af665f 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1481,13 +1481,14 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) | |||
| 1481 | { | 1481 | { |
| 1482 | /* Try matching at position POS. */ | 1482 | /* Try matching at position POS. */ |
| 1483 | int this_pos = pos - len; | 1483 | int this_pos = pos - len; |
| 1484 | int this_pos_byte = CHAR_TO_BYTE (this_pos); | 1484 | int this_pos_byte; |
| 1485 | int this_len = len; | 1485 | int this_len = len; |
| 1486 | int this_len_byte = len_byte; | 1486 | int this_len_byte = len_byte; |
| 1487 | unsigned char *p = pat; | 1487 | unsigned char *p = pat; |
| 1488 | 1488 | ||
| 1489 | if (this_pos < lim || this_pos_byte < lim_byte) | 1489 | if (this_pos < lim || (pos_byte - len_byte) < lim_byte) |
| 1490 | goto stop; | 1490 | goto stop; |
| 1491 | this_pos_byte = CHAR_TO_BYTE (this_pos); | ||
| 1491 | match_byte = pos_byte - this_pos_byte; | 1492 | match_byte = pos_byte - this_pos_byte; |
| 1492 | 1493 | ||
| 1493 | while (this_len > 0) | 1494 | while (this_len > 0) |