소스 검색

Remove test for negative zero, as -0 is acceptable output

Debora Grosse 8 년 전
부모
커밋
a69ad22639
1개의 변경된 파일0개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      cJSON.c

+ 0 - 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 */