From: Mark Alexander Date: Thu, 19 Jun 1997 15:18:13 +0000 (+0000) Subject: * utils.c (floatformat_from_doublest): Improve test for infinity. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b91bc2295fa16b69418801d2fa0d505036bfac5;p=binutils-gdb.git * utils.c (floatformat_from_doublest): Improve test for infinity. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 62048f46610..4aeeeddeb98 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Thu Jun 19 08:18:48 1997 Mark Alexander + + * utils.c (floatformat_from_doublest): Improve test for infinity. + Wed Jun 18 13:47:52 1997 Fred Fish * dwarfread.c (isreg, optimized_out, offreg, basereg): Move diff --git a/gdb/utils.c b/gdb/utils.c index e4de8531514..716f92ef831 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,