summaryrefslogtreecommitdiff
path: root/upb/json/printer.c
diff options
context:
space:
mode:
Diffstat (limited to 'upb/json/printer.c')
-rw-r--r--upb/json/printer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/json/printer.c b/upb/json/printer.c
index 90705a7..38f817d 100644
--- a/upb/json/printer.c
+++ b/upb/json/printer.c
@@ -181,11 +181,11 @@ const char neginf[] = "\"-Infinity\"";
const char inf[] = "\"Infinity\"";
static size_t fmt_double(double val, char* buf, size_t length) {
- if (val == (1.0 / 0.0)) {
+ if (val == UPB_INFINITY) {
CHKLENGTH(length >= strlen(inf));
strcpy(buf, inf);
return strlen(inf);
- } else if (val == (-1.0 / 0.0)) {
+ } else if (val == -UPB_INFINITY) {
CHKLENGTH(length >= strlen(neginf));
strcpy(buf, neginf);
return strlen(neginf);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback