diff --git a/cJSON.c b/cJSON.c index 62ce91c..de26ec5 100644 --- a/cJSON.c +++ b/cJSON.c @@ -228,7 +228,7 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number) } else { - object->valueint = cJSON_Number; + object->valueint = (int)number; } return object->valuedouble = number;