diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-04-15 10:35:58 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2016-04-15 10:35:58 -0700 |
commit | 5b1804d52a13723303c290e8b4e7ce8f25f2599c (patch) | |
tree | 1cc721b24c5ee090daafa50ea7b20b79a8231ed5 /upb | |
parent | 89197b9358c127e41dd9f428578783ec09a94d82 (diff) |
Fix for JSON error reporting. (#57)
Clearly upb needs more tests in its repository. Running the
protobuf conformance tests against upb would be a great start...
Diffstat (limited to 'upb')
-rw-r--r-- | upb/json/parser.rl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/upb/json/parser.rl b/upb/json/parser.rl index 943a490..3e1ea94 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -1269,7 +1269,7 @@ size_t parse(void *closure, const void *hd, const char *buf, size_t size, %% write exec; if (p != pe) { - upb_status_seterrf(&parser->status, "Parse error at '%.*s'\n", p, pe - p); + upb_status_seterrf(&parser->status, "Parse error at '%.*s'\n", pe - p, p); upb_env_reporterror(parser->env, &parser->status); } else { capture_suspend(parser, &p); |