From ef34500693e8c4a2849d41a4bd66fd19c9ec46c2 Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Tue, 28 Mar 2017 17:29:12 +0200 Subject: [PATCH] cJSON_SetNumberHelper: Fix valueint, closes #138 Thanks @mmkeeper --- cJSON.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON.c b/cJSON.c index 62ce91c3..de26ec5e 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;