Skip to content

Commit

Permalink
cJSON_SetNumberHelper: Fix valueint, closes #138
Browse files Browse the repository at this point in the history
Thanks @mmkeeper
  • Loading branch information
FSMaxB committed Mar 28, 2017
1 parent b0dfcde commit ef34500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ef34500

Please sign in to comment.