aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2004-03-09 02:19:36 +0000
committerKenichi Handa2004-03-09 02:19:36 +0000
commit130b729cfb0365a7b214b91659dc19afa3da011a (patch)
tree4efecc4c4b41a6c5e9b8d5d1384e0819b77ec7ed /src
parent0aae32888786588697103459ab4838a820d9fb5f (diff)
downloademacs-130b729cfb0365a7b214b91659dc19afa3da011a.tar.gz
emacs-130b729cfb0365a7b214b91659dc19afa3da011a.zip
(simple_search): Fix settingthis_pos_byte in backward search.
Diffstat (limited to 'src')
-rw-r--r--src/search.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index 96ea41e8f8e..bdd2ef92843 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1358,13 +1358,14 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte)
1358 { 1358 {
1359 /* Try matching at position POS. */ 1359 /* Try matching at position POS. */
1360 int this_pos = pos - len; 1360 int this_pos = pos - len;
1361 int this_pos_byte = pos_byte - len_byte; 1361 int this_pos_byte;
1362 int this_len = len; 1362 int this_len = len;
1363 int this_len_byte = len_byte; 1363 int this_len_byte = len_byte;
1364 unsigned char *p = pat; 1364 unsigned char *p = pat;
1365 1365
1366 if (pos - len < lim) 1366 if (pos - len < lim)
1367 goto stop; 1367 goto stop;
1368 this_pos_byte = CHAR_TO_BYTE (this_pos);
1368 1369
1369 while (this_len > 0) 1370 while (this_len > 0)
1370 { 1371 {