aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/search.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index b43756f0a5c..e0ca9a5bf6d 100644
--- a/src/search.c
+++ b/src/search.c
@@ -610,7 +610,11 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt)
610 int s1, s2; 610 int s1, s2;
611 611
612 /* Null string is found at starting position. */ 612 /* Null string is found at starting position. */
613 if (!len) 613 if (len == 0)
614 return pos;
615
616 /* Searching 0 times means don't move. */
617 if (n == 0)
614 return pos; 618 return pos;
615 619
616 if (RE) 620 if (RE)