X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsearch.c;h=051fded200a7b5be3829d9502095067057c25b01;hb=976b002b16336930724ae22476014583ad022e7d;hp=cb66c4f5d6ce9fa98bfac47ca1b9a6cd29771890;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/src/search.c b/src/search.c index cb66c4f..051fded 100644 --- a/src/search.c +++ b/src/search.c @@ -1963,7 +1963,7 @@ and you do not need to specify it.) Charcount subend = -1; c = string_char (XSTRING (newtext), strpos); - if (c == '\\') + if (c == '\\' && strpos < stlen - 1) { c = string_char (XSTRING (newtext), ++strpos); if (c == '&') @@ -2109,7 +2109,7 @@ and you do not need to specify it.) Charcount offset = BUF_PT (buf) - search_regs.start[0]; c = string_char (XSTRING (newtext), strpos); - if (c == '\\') + if (c == '\\' && strpos < stlen - 1) { c = string_char (XSTRING (newtext), ++strpos); if (c == '&')