# HG changeset patch # User Kenichi Handa # Date 1078798776 0 # Node ID 885b083d5599e64ddd636ceafedeb5beaded2bae # Parent 85a6eb05dc8f69019e5802dc538ce6c19a70f841 (simple_search): Fix settingthis_pos_byte in backward search. diff -r 85a6eb05dc8f -r 885b083d5599 src/search.c --- a/src/search.c Mon Mar 08 23:16:20 2004 +0000 +++ b/src/search.c Tue Mar 09 02:19:36 2004 +0000 @@ -1358,13 +1358,14 @@ { /* Try matching at position POS. */ int this_pos = pos - len; - int this_pos_byte = pos_byte - len_byte; + int this_pos_byte; int this_len = len; int this_len_byte = len_byte; unsigned char *p = pat; if (pos - len < lim) goto stop; + this_pos_byte = CHAR_TO_BYTE (this_pos); while (this_len > 0) {