From 7a1e6aa84ba857d2e3cdc6e5fd50e3bda210c164 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 30 Jul 2019 15:43:50 -0700 Subject: Support MSVC prior to 2015 --- upb/json/parser.rl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upb/json/parser.rl') diff --git a/upb/json/parser.rl b/upb/json/parser.rl index fd3704c..f80ed18 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -947,7 +947,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_fieldtype_t type = upb_fielddef_type(p->top->f); double val; double dummy; - double inf = 1.0 / 0.0; /* C89 does not have an INFINITY macro. */ + double inf = UPB_INFINITY; errno = 0; -- cgit v1.2.3