diff --git a/cJSON.c b/cJSON.c index f6dd11c..54f63f4 100644 --- a/cJSON.c +++ b/cJSON.c @@ -1317,13 +1317,6 @@ static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buf } /* parse the different types of values */ - /* null */ - if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) == 0)) - { - item->type = cJSON_NULL; - input_buffer->offset += 4; - return true; - } /* false */ if (can_read(input_buffer, 5) && (strncmp((const char*)buffer_at_offset(input_buffer), "false", 5) == 0)) { @@ -1359,6 +1352,13 @@ static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buf { return parse_object(item, input_buffer); } + /* null */ + if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) == 0)) + { + item->type = cJSON_NULL; + input_buffer->offset += 4; + return true; + } return false; }