diff --git a/cJSON.c b/cJSON.c index 0f6d5e9..3c819bd 100644 --- a/cJSON.c +++ b/cJSON.c @@ -230,7 +230,7 @@ static const char *parse_object(cJSON *item,const char *value); static char *print_object(cJSON *item,int depth,int fmt); /* Utility to jump whitespace and cr/lf */ -static const char *skip(const char *in) {while (in && (unsigned char)*in<=32) in++; return in;} +static const char *skip(const char *in) {while (in && *in && (unsigned char)*in<=32) in++; return in;} /* Parse an object - create a new root, and populate. */ cJSON *cJSON_Parse(const char *value)