From 107887aacff65473fc3dfd919f9c184c842dec4d Mon Sep 17 00:00:00 2001 From: John Kerl Date: Thu, 16 Apr 2020 23:34:10 -0400 Subject: [PATCH] JSON parse-error messages alwasys said "column 0"; fixed --- c/input/json_parser.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/c/input/json_parser.c b/c/input/json_parser.c index 5b6f5ec2c..363ae5809 100644 --- a/c/input/json_parser.c +++ b/c/input/json_parser.c @@ -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;