0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00

float.c: correct the exponent

We would accidentally produce an exponent which was exactly +1 from
the correct one.
This commit is contained in:
H. Peter Anvin 2007-10-04 22:51:08 -07:00
parent b8e604eb5d
commit cdb227fa71

View File

@ -376,7 +376,7 @@ static int to_float(char *str, int32_t sign, uint8_t *result,
/* /*
* Normalised. * Normalised.
*/ */
exponent += expmax; exponent += expmax-1;
ieee_shr(mant, fmt->exponent); ieee_shr(mant, fmt->exponent);
ieee_round(mant, fmt->words); ieee_round(mant, fmt->words);
/* did we scale up by one? */ /* did we scale up by one? */