diff options
author | Serge A. Zaitsev <devnull@localhost> | 2010-11-15 15:02:35 +0200 |
---|---|---|
committer | Serge A. Zaitsev <devnull@localhost> | 2010-11-15 15:02:35 +0200 |
commit | a20a5aff1c300ba3784fff5ab284dac8caf9475a (patch) | |
tree | e968624be6c1ad18df53376c25ad4176ac6b47d0 /jsmn.c | |
parent | 0568be6e0b1304226ddf8b17f3df4a5dfa2babdd (diff) |
Fix: error position is an offset, not a pointer
Diffstat (limited to 'jsmn.c')
-rw-r--r-- | jsmn.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -104,7 +104,7 @@ int jsmn_parse(const unsigned char *js, jsontok_t *tokens, size_t num_tokens, in switch (obj_state[*p]) { case JSON_ERROR: if (errpos != NULL) { - *errpos = p; + *errpos = p - js; } return -1; |