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>
This commit is contained in:
parent
d5f6a01af0
commit
7a8ac59f2f
@ -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…
Reference in New Issue
Block a user