summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5f6a01)
raw | patch | inline | side by side (parent: d5f6a01)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 26 Oct 2006 09:05:05 +0000 (02:05 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 26 Oct 2006 09:05:05 +0000 (02:05 -0700) |
We forgot that the last element of sline[] is a sentinel without
the actual line. *BLUSH*
Signed-off-by: Junio C Hamano <junkio@cox.net>
the actual line. *BLUSH*
Signed-off-by: Junio C Hamano <junkio@cox.net>
combine-diff.c | patch | blob | history |
diff --git a/combine-diff.c b/combine-diff.c
index 01a8437f5c837f30eb463d19b98774d56f182283..76ca6513699eb0de58fccac14afe7ee97646d69c 100644 (file)
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -491,7 +491,11 @@ static void show_parent_lno(struct sline *sline, unsigned long l0, unsigned long
static int hunk_comment_line(const char *bol)
{
- int ch = *bol & 0xff;
+ int ch;
+
+ if (!bol)
+ return 0;
+ ch = *bol & 0xff;
return (isalpha(ch) || ch == '_' || ch == '$');
}