diff options
Diffstat (limited to 'softfloat/f32_to_i64.c')
-rwxr-xr-x | softfloat/f32_to_i64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/softfloat/f32_to_i64.c b/softfloat/f32_to_i64.c index 34f877f..c0b8981 100755 --- a/softfloat/f32_to_i64.c +++ b/softfloat/f32_to_i64.c @@ -25,7 +25,7 @@ int_fast64_t f32_to_i64( float32_t a, int_fast8_t roundingMode, bool exact ) shiftCount = 0xBE - exp;
if ( shiftCount < 0 ) {
softfloat_raiseFlags( softfloat_flag_invalid );
- if ( ! sign ) {
+ if ( ! sign || ( ( exp == 0xFF ) && sig ) ) {
return INT64_C( 0x7FFFFFFFFFFFFFFF );
}
return - INT64_C( 0x7FFFFFFFFFFFFFFF ) - 1;
|