for-each-ref: fix off by one read.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder committed
Nov 12, 2007 at 05:37 UTC
a74fa1106dd29390077025e7f176cf6b53eada62
1 file changed
+1
-1
builtin-for-each-ref.c
+1
-1
@@ -297,7 +297,7 @@ static const char *find_wholine(const char *who, int wholen, const char *buf, un
297
if (!eol)
298
return "";
299
eol++;
300
- if (eol[1] == '\n')
300
+ if (*eol == '\n')
301
return ""; /* end of header */
302
buf = eol;
303
}