diff --git a/cJSON.c b/cJSON.c index b2ba100d0b94375239c57ce2c654c41a2798c9b5..5c0c4698f7323aee7e57d3a06a3ebaeb3d8f1db0 100644 --- a/cJSON.c +++ b/cJSON.c @@ -909,7 +909,7 @@ static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p) } if (p) { - switch ((item->type) & 255) + switch ((item->type) & 0xFF) { case cJSON_NULL: out = ensure(p, 5); @@ -948,7 +948,7 @@ static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p) } else { - switch ((item->type) & 255) + switch ((item->type) & 0xFF) { case cJSON_NULL: out = cJSON_strdup("null");