1. Serge Zaitsev
  2. jsmn

Commits

Serge A. Zaitsev  committed f765951

Fix: error position is an offset, not a pointer

  • Participants
  • Parent commits 03af3a5
  • Branches default

Comments (0)

Files changed (1)

File jsmn.c

View file
 		switch (obj_state[*p]) {
 			case JSON_ERROR:
 				if (errpos != NULL) {
-					*errpos = p;
+					*errpos = p - js;
 				}
 				return -1;