Skip to content

Commit

Permalink
to avoid gcc -Werror=float-equal error
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Noel Bouteville committed Jun 2, 2024
1 parent 3249730 commit eecfcf6
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 @@ -570,7 +570,7 @@ static cJSON_bool print_number(const cJSON * const item, printbuffer * const out
{
length = sprintf((char*)number_buffer, "null");
}
else if(d == (double)item->valueint)
else if (compare_double(d, (double)item->valueint))
{
length = sprintf((char*)number_buffer, "%d", item->valueint);
}
Expand Down

0 comments on commit eecfcf6

Please sign in to comment.