libnum: fix strToBuffer ignoring the integer part on calc targets
This commit is contained in:
parent
f13096dd6e
commit
18b42e4e77
|
@ -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.
|
||||
# ---
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue