diff options
Diffstat (limited to 'py/formatfloat.c')
-rw-r--r-- | py/formatfloat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/formatfloat.c b/py/formatfloat.c index b16746b39..ea5a07977 100644 --- a/py/formatfloat.c +++ b/py/formatfloat.c @@ -332,7 +332,7 @@ int mp_format_float(FPTYPE f, char *buf, size_t buf_size, char fmt, int prec, ch // Print the digits of the mantissa for (int i = 0; i < num_digits; ++i, --dec) { - int32_t d = f; + int32_t d = (int32_t)f; *s++ = '0' + d; if (dec == 0 && prec > 0) { *s++ = '.'; |