aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Alexander <marka@cygnus>1997-06-19 15:18:13 +0000
committerMark Alexander <marka@cygnus>1997-06-19 15:18:13 +0000
commit9b91bc2295fa16b69418801d2fa0d505036bfac5 (patch)
tree7c709b052a5ab6b3608234ff9ca80538e04a2654 /gdb
parent283e535d3f61a1d8f8dbc6c9983b08031eca9dbb (diff)
downloadgdb-9b91bc2295fa16b69418801d2fa0d505036bfac5.zip
gdb-9b91bc2295fa16b69418801d2fa0d505036bfac5.tar.gz
gdb-9b91bc2295fa16b69418801d2fa0d505036bfac5.tar.bz2
* utils.c (floatformat_from_doublest): Improve test for infinity.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/utils.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 62048f4..4aeeedd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jun 19 08:18:48 1997 Mark Alexander <marka@cygnus.com>
+
+ * utils.c (floatformat_from_doublest): Improve test for infinity.
+
Wed Jun 18 13:47:52 1997 Fred Fish <fnf@cygnus.com>
* dwarfread.c (isreg, optimized_out, offreg, basereg): Move
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,