From 944772c70a9e76c4f77c9b17593b433fd46558af Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 12 Nov 2002 21:47:53 +0000 Subject: [PATCH] 2002-11-12 Jeff Johnston * libc/stdlib/ldtoa.c (e64toe): When checking the exponent for inf/nan, make sure that the check ignores the sign bit. --- newlib/ChangeLog | 5 +++++ newlib/libc/stdlib/ldtoa.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index ddac73824..df54f0d8d 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2002-11-12 Jeff Johnston + + * libc/stdlib/ldtoa.c (e64toe): When checking the exponent + for inf/nan, make sure that the check ignores the sign bit. + 2002-11-07 Joel Sherrill * libc/sys/rtems/machine: New directory. diff --git a/newlib/libc/stdlib/ldtoa.c b/newlib/libc/stdlib/ldtoa.c index da652dd42..ca8b9f363 100644 --- a/newlib/libc/stdlib/ldtoa.c +++ b/newlib/libc/stdlib/ldtoa.c @@ -1859,7 +1859,7 @@ if((yy[NE-1] & 0x7fff) == 0 && (yy[NE-2] & 0x8000) == 0) #ifdef INFINITY /* Point to the exponent field. */ p = &yy[NE-1]; -if( *p == 0x7fff ) +if( (*p & 0x7fff) == 0x7fff ) { #ifdef NANS #ifdef IBMPC