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...
pull/13171/head
Joshua Haberman 9 years ago
parent 89197b9358
commit 5b1804d52a
  1. 2
      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);

Loading…
Cancel
Save