libnum: fix strToBuffer ignoring the integer part on calc targets

This commit is contained in:
Lephenixnoir 2024-03-12 09:38:01 +01:00
parent f13096dd6e
commit 18b42e4e77
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
# SH4AL-DSP optimized i32 / i16 -> i16 division.
#
# This simply uses the CPU's ability to divide without rotation for 16 bit
# divisors without all the boilerplate than libgcc's __sdivisi3 requires since
# divisors without all the boilerplate that libgcc's __sdivisi3 requires since
# it assumes 32-bit inputs. Used for num16 division.
# ---

View File

@ -61,7 +61,7 @@ static int toString(char *str, T x)
integral_part = -integral_part - (x.frac().v != 0);
}
n += sprintf(str + n, "%ld", integral_part);
n += sprintf(str + n, "%lld", integral_part);
if(x.frac().v != 0) {
str[n++] = '.';
n += decimalDigits<T>(str + n, x);