# HG changeset patch
# User Richard M. Stallman <rms@gnu.org>
# Date 743757954 0
# Node ID 7a2e1d7362c55a3372588bfb66ece0d9b9970cde
# Parent  2455c90e1371e3aa2404128421664f4e2fe6f74f
(search_buffer): If n is 0, just return POS.

diff -r 2455c90e1371 -r 7a2e1d7362c5 src/search.c
--- a/src/search.c	Tue Jul 27 05:51:39 1993 +0000
+++ b/src/search.c	Tue Jul 27 07:25:54 1993 +0000
@@ -610,7 +610,11 @@
   int s1, s2;
 
   /* Null string is found at starting position.  */
-  if (!len)
+  if (len == 0)
+    return pos;
+
+  /* Searching 0 times means don't move.  */
+  if (n == 0)
     return pos;
 
   if (RE)