Browse Source

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>
maint
Junio C Hamano 19 years ago
parent
commit
7a8ac59f2f
  1. 6
      combine-diff.c

6
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) 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 == '$'); return (isalpha(ch) || ch == '_' || ch == '$');
} }



Loading…
Cancel
Save