summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/regex.c b/regex.c
index 79692803..859f9f8f 100644
--- a/regex.c
+++ b/regex.c
@@ -2336,10 +2336,8 @@ val search_regex(val haystack, val needle_regex, val start,
for (i = c_num(length_str(haystack)) - 1; i >= s; i--) {
cnum span = regex_run(needle_regex, h + i);
- if (span >= 0) {
- rel1(&haystack);
+ if (span >= 0)
return cons(num(i), num(span));
- }
}
gc_hint(haystack);