JSON parse-error messages alwasys said "column 0"; fixed

This commit is contained in:
John Kerl 2020-04-16 23:34:10 -04:00
parent acb48e3679
commit 107887aacf

View file

@ -459,6 +459,7 @@ json_value_t * json_parse(
*ppend_of_item = pb + 1;
break;
state.cur_col++;
switch (b) {
WHITESPACE:
continue;
@ -471,6 +472,7 @@ json_value_t * json_parse(
}
if (flags & FLAG_SEEK_VALUE) {
state.cur_col++;
switch (b) {
WHITESPACE:
continue;
@ -653,6 +655,7 @@ json_value_t * json_parse(
switch (ptop->type) {
case JSON_OBJECT:
state.cur_col++;
switch (b) {
WHITESPACE:
continue;