diff options
author | Junio C Hamano <junkio@cox.net> | 2006-10-26 02:05:05 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-10-26 02:05:05 -0700 |
commit | 7a8ac59f2f1fdac71fdffe53eebdca382118585f (patch) | |
tree | 983b9e91e1758d87c50426fe602b519b364772a7 /combine-diff.c | |
parent | d5f6a01af0658bc0ec5f068d81ba321be94526d5 (diff) | |
download | git-7a8ac59f2f1fdac71fdffe53eebdca382118585f.tar.gz |
combine-diff: fix hunk_comment_line logic.
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>
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/combine-diff.c b/combine-diff.c index 01a8437f5c..76ca651369 100644 --- 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 == '$'); } |