diff options
author | Mark Alexander <marka@cygnus> | 1997-06-19 15:18:13 +0000 |
---|---|---|
committer | Mark Alexander <marka@cygnus> | 1997-06-19 15:18:13 +0000 |
commit | 9b91bc2295fa16b69418801d2fa0d505036bfac5 (patch) | |
tree | 7c709b052a5ab6b3608234ff9ca80538e04a2654 /gdb/utils.c | |
parent | 283e535d3f61a1d8f8dbc6c9983b08031eca9dbb (diff) | |
download | gdb-9b91bc2295fa16b69418801d2fa0d505036bfac5.zip gdb-9b91bc2295fa16b69418801d2fa0d505036bfac5.tar.gz gdb-9b91bc2295fa16b69418801d2fa0d505036bfac5.tar.bz2 |
* utils.c (floatformat_from_doublest): Improve test for infinity.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |