Commit e57bd499 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

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
No related merge requests found
Showing with 3 additions and 1 deletion
+3 -1
...@@ -247,6 +247,8 @@ CVS code - ...@@ -247,6 +247,8 @@ CVS code -
the text of the spell-checked file into its own function, the text of the spell-checked file into its own function,
replace_buffer(). (DLR) replace_buffer(). (DLR)
- utils.c: - utils.c:
parse_line_column()
- Simplify parsing of the column number. (DLR)
ngetdelim() ngetdelim()
- Do sanity checks in an assert instead of checking them - Do sanity checks in an assert instead of checking them
manually and returning -1 if they fail. (DLR) manually and returning -1 if they fail. (DLR)
......
...@@ -94,7 +94,7 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column) ...@@ -94,7 +94,7 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
comma = strchr(str, ','); comma = strchr(str, ',');
if (comma != NULL && column != NULL) { if (comma != NULL && column != NULL) {
if (!parse_num(str + (comma - str + 1), column)) if (!parse_num(comma + 1, column))
retval = FALSE; retval = FALSE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment