checkdiff_consume: strtol parameter fix.
The second parameter is not the end of string input; it is the optional return value to retrieve where the parser stopped. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
87a56cd3b1
commit
9e848163ed
2
diff.c
2
diff.c
@ -431,7 +431,7 @@ static void checkdiff_consume(void *priv, char *line, unsigned long len)
|
|||||||
else if (line[0] == '@') {
|
else if (line[0] == '@') {
|
||||||
char *plus = strchr(line, '+');
|
char *plus = strchr(line, '+');
|
||||||
if (plus)
|
if (plus)
|
||||||
data->lineno = strtol(plus, line + len, 10);
|
data->lineno = strtol(plus, NULL, 10);
|
||||||
else
|
else
|
||||||
die("invalid diff");
|
die("invalid diff");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user