mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Remove test for negative zero, as -0 is acceptable output
This commit is contained in:
parent
3fc9bc0648
commit
a69ad22639
5
cJSON.c
5
cJSON.c
@ -431,11 +431,6 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out
|
||||
{
|
||||
length = sprintf((char*)number_buffer, "null");
|
||||
}
|
||||
/* This checks for negative zero */
|
||||
else if (d == 0)
|
||||
{
|
||||
length = sprintf((char*)number_buffer, "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Try 15 decimal places of precision to avoid nonsignificant nonzero digits */
|
||||
|
Loading…
Reference in New Issue
Block a user