summaryrefslogtreecommitdiff
path: root/builtin-for-each-ref.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2007-11-12 04:37:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-11-12 07:40:33 (GMT)
commita74fa1106dd29390077025e7f176cf6b53eada62 (patch)
treec273bfb5a9585accfb1cf1f4e52e44b621877728 /builtin-for-each-ref.c
parent53e780c8f662bb937dc66a698c34fa2407cff31b (diff)
downloadgit-a74fa1106dd29390077025e7f176cf6b53eada62.zip
git-a74fa1106dd29390077025e7f176cf6b53eada62.tar.gz
git-a74fa1106dd29390077025e7f176cf6b53eada62.tar.bz2
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>
Diffstat (limited to 'builtin-for-each-ref.c')
-rw-r--r--builtin-for-each-ref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-for-each-ref.c b/builtin-for-each-ref.c
index 29f70aa..0327f40 100644
--- a/builtin-for-each-ref.c
+++ b/builtin-for-each-ref.c
@@ -297,7 +297,7 @@ static const char *find_wholine(const char *who, int wholen, const char *buf, un
if (!eol)
return "";
eol++;
- if (eol[1] == '\n')
+ if (*eol == '\n')
return ""; /* end of header */
buf = eol;
}