summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index ff9eefec917..7f006883270 100644
--- a/src/search.c
+++ b/src/search.c
@@ -215,7 +215,7 @@ matched by parenthesis constructs in the pattern.")
CHECK_NUMBER (start, 2);
s = XINT (start);
if (s < 0 && -s <= len)
- s = len - s;
+ s = len + s;
else if (0 > s || s > len)
args_out_of_range (string, start);
}