cJSON_SetNumberHelper: Fix valueint, closes #138

Thanks @mmkeeper
This commit is contained in:
Max Bruckner 2017-03-28 17:29:12 +02:00
parent b0dfcde04c
commit ef34500693

View File

@ -228,7 +228,7 @@ CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number)
} }
else else
{ {
object->valueint = cJSON_Number; object->valueint = (int)number;
} }
return object->valuedouble = number; return object->valuedouble = number;