* utils.c (floatformat_from_doublest): Improve test for infinity.
authorMark Alexander <marka@cygnus>
Thu, 19 Jun 1997 15:18:13 +0000 (15:18 +0000)
committerMark Alexander <marka@cygnus>
Thu, 19 Jun 1997 15:18:13 +0000 (15:18 +0000)
gdb/ChangeLog
gdb/utils.c

index 62048f46610392ff6f21b80143182f4cafe288e9..4aeeeddeb98aa342dae035076e0737cd17393474 100644 (file)
@@ -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
index e4de853151496437b0c77a236699194822a8cfac..716f92ef831dff91a016a8d233fe8941f44510c6 100644 (file)
@@ -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,