From: Richard M. Stallman Date: Tue, 27 Jul 1993 07:25:54 +0000 (+0000) Subject: (search_buffer): If n is 0, just return POS. X-Git-Tag: emacs-19.34~11552 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3f57a49957134c4601103d12930583cd8f65ada5;p=emacs.git (search_buffer): If n is 0, just return POS. --- 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) 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)