Skip to content

Commit f1beccc

Browse files
committed
Update cJSON.c
1 parent 74c4e20 commit f1beccc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cJSON/cJSON.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3047,13 +3047,15 @@ CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item)
30473047

30483048
CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive)
30493049
{
3050-
int type = a->type & 0xFF;
3050+
int type;
30513051

30523052
if ((a == NULL) || (b == NULL) || cJSON_IsInvalid(a))
30533053
{
30543054
return false;
30553055
}
30563056

3057+
type = a->type & 0xFF;
3058+
30573059
if ((a->type & 0xFF) != (b->type & 0xFF))
30583060
{
30593061
if (((a->type & 0xFF) == cJSON_Int && (b->type & 0xFF) == cJSON_Number) ||

0 commit comments

Comments
 (0)