utils: go on to parse the line number even if the column number is bad
This fixes https://savannah.gnu.org/bugs/?49933.master
parent
c24caf5fb8
commit
87b2df6dea
|
@ -124,16 +124,16 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
||||||
if (comma == NULL)
|
if (comma == NULL)
|
||||||
return parse_num(str, line);
|
return parse_num(str, line);
|
||||||
|
|
||||||
if (!parse_num(comma + 1, column))
|
retval = parse_num(comma + 1, column);
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (comma == str)
|
if (comma == str)
|
||||||
return TRUE;
|
return retval;
|
||||||
|
|
||||||
firstpart = mallocstrcpy(NULL, str);
|
firstpart = mallocstrcpy(NULL, str);
|
||||||
firstpart[comma - str] = '\0';
|
firstpart[comma - str] = '\0';
|
||||||
|
|
||||||
retval = parse_num(firstpart, line);
|
retval = parse_num(firstpart, line);
|
||||||
|
|
||||||
free(firstpart);
|
free(firstpart);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
|
|
Loading…
Reference in New Issue