summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--float.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/float.c b/float.c
index 64a77b86..c6126890 100644
--- a/float.c
+++ b/float.c
@@ -376,7 +376,7 @@ static int to_float(char *str, int32_t sign, uint8_t *result,
/*
* Normalised.
*/
- exponent += expmax;
+ exponent += expmax-1;
ieee_shr(mant, fmt->exponent);
ieee_round(mant, fmt->words);
/* did we scale up by one? */