diff options
Diffstat (limited to 'lib/builtins/fp_fixuint_impl.inc')
-rw-r--r-- | lib/builtins/fp_fixuint_impl.inc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/builtins/fp_fixuint_impl.inc b/lib/builtins/fp_fixuint_impl.inc index b223c6384..d68ccf27a 100644 --- a/lib/builtins/fp_fixuint_impl.inc +++ b/lib/builtins/fp_fixuint_impl.inc @@ -27,7 +27,7 @@ static __inline fixuint_t __fixuint(fp_t a) { return 0; // If the value is too large for the integer type, saturate. - if ((unsigned)exponent > sizeof(fixuint_t) * CHAR_BIT) + if ((unsigned)exponent >= sizeof(fixuint_t) * CHAR_BIT) return ~(fixuint_t)0; // If 0 <= exponent < significandBits, right shift to get the result. |