From 9b91bc2295fa16b69418801d2fa0d505036bfac5 Mon Sep 17 00:00:00 2001 From: Mark Alexander Date: Thu, 19 Jun 1997 15:18:13 +0000 Subject: * utils.c (floatformat_from_doublest): Improve test for infinity. --- gdb/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/utils.c') diff --git a/gdb/utils.c b/gdb/utils.c index e4de853..716f92e 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2387,7 +2387,7 @@ floatformat_from_doublest (fmt, from, to) dfrom = -dfrom; } - if (dfrom + 1 == dfrom) /* Result is Infinity */ + if (dfrom + dfrom == dfrom && dfrom != 0.0) /* Result is Infinity */ { /* Infinity exponent is same as NaN's. */ put_field (uto, fmt->byteorder, fmt->totalsize, fmt->exp_start, -- cgit v1.1