type int problematic for size, start and end indicators

Issue #44 new
Sebastian Freundt
created an issue

Large strings produce weird results when the range of int is exceeded due to undefined behaviour regarding integer overflow.

Could you either change the type to unsigned int or make the type configurable (a la

#ifndef INDEX_TYPE
#define INDEX_TYPE int

typedef struct {
    jsmntype_t type;
    INDEX_TYPE start;
    INDEX_TYPE end;
    INDEX_TYPE size;
    INDEX_TYPE parent;
} jsmntok_t;