cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit 3ea491c0a603f50ca0fb2505badd332fbd141f75
parent 050829f2746320edd6917f77e966dbfe7fcb129b
Author: Max Bruckner <max@maxbruckner.de>
Date:   Sat,  5 Nov 2016 21:26:18 +0700

Fix #26: Use long double literal for 1e60

Big thanks at mvollmer (https://sourceforge.net/p/cjson/bugs/45/)

Diffstat:
McJSON.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cJSON.c b/cJSON.c @@ -327,7 +327,7 @@ static char *print_number(const cJSON *item, printbuffer *p) { sprintf(str, "null"); } - else if ((fabs(floor(d) - d) <= DBL_EPSILON) && (fabs(d) < 1.0e60)) + else if ((fabs(floor(d) - d) <= DBL_EPSILON) && (fabs(d) < 1.0e60L)) { sprintf(str, "%.0f", d); }