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>
This commit is contained in:
Christian Couder 2007-11-12 05:37:25 +01:00 committed by Junio C Hamano
parent 53e780c8f6
commit a74fa1106d

View File

@ -297,7 +297,7 @@ static const char *find_wholine(const char *who, int wholen, const char *buf, un
if (!eol) if (!eol)
return ""; return "";
eol++; eol++;
if (eol[1] == '\n') if (*eol == '\n')
return ""; /* end of header */ return ""; /* end of header */
buf = eol; buf = eol;
} }