in parse_line_column(), simplify parsing of the column number

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
David Lawrence Ramsey 2005-12-23 03:15:12 +00:00
parent bf38aad0be
commit e57bd4993e
2 changed files with 3 additions and 1 deletions

View File

@ -247,6 +247,8 @@ CVS code -
the text of the spell-checked file into its own function,
replace_buffer(). (DLR)
- utils.c:
parse_line_column()
- Simplify parsing of the column number. (DLR)
ngetdelim()
- Do sanity checks in an assert instead of checking them
manually and returning -1 if they fail. (DLR)

View File

@ -94,7 +94,7 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
comma = strchr(str, ',');
if (comma != NULL && column != NULL) {
if (!parse_num(str + (comma - str + 1), column))
if (!parse_num(comma + 1, column))
retval = FALSE;
}