From ad10348f71b094d88e6331b737208e46e8d37855 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 9 Jun 1995 01:07:18 +0000 Subject: [PATCH] (Freplace_match): Fix check for valid reg in string replace. --- src/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index c7b9be1b41b..4fdbf8c7f0d 100644 --- a/src/search.c +++ b/src/search.c @@ -1663,7 +1663,7 @@ which is made by replacing the part of STRING that was matched.") } else if (c >= '1' && c <= '9' && c <= search_regs.num_regs + '0') { - if (search_regs.start[c - '0'] >= 1) + if (search_regs.start[c - '0'] >= 0) { substart = search_regs.start[c - '0']; subend = search_regs.end[c - '0']; -- 2.39.2