Skip to content

Commit

Permalink
combine-diff: fix hunk_comment_line logic.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Oct 26, 2006
1 parent d5f6a01 commit 7a8ac59
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion combine-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 == '$');
}

Expand Down

0 comments on commit 7a8ac59

Please sign in to comment.