on 32-bit machines only unsigned long longs are 64-bits long. Not just unsigned longs...

Note that this means that up to now all outputs (including logs) of counts > 32 bits were broken on 32-bit systems.
This commit is contained in:
Bernhard Amann 2012-08-28 00:44:39 -07:00
parent 20c71cac51
commit 26f5aee7f6

View file

@ -56,7 +56,7 @@ void modp_uitoa10(uint32_t value, char* str)
void modp_litoa10(int64_t value, char* str) void modp_litoa10(int64_t value, char* str)
{ {
char* wstr=str; char* wstr=str;
unsigned long uvalue = (value < 0) ? -value : value; unsigned long long uvalue = (value < 0) ? -value : value;
// Conversion. Number is reversed. // Conversion. Number is reversed.
do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10); do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10);