diff options
Diffstat (limited to 'src/storage_number.c')
-rw-r--r-- | src/storage_number.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/storage_number.c b/src/storage_number.c index 225cf034..b5c5f406 100644 --- a/src/storage_number.c +++ b/src/storage_number.c @@ -129,7 +129,7 @@ static char *print_calculated_number_lu_r(char *str, unsigned long uvalue) { char *wstr = str; // print each digit - do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10); + do *wstr++ = (char)('0' + (uvalue % 10)); while(uvalue /= 10); return wstr; } @@ -137,7 +137,7 @@ static char *print_calculated_number_llu_r(char *str, unsigned long long uvalue) char *wstr = str; // print each digit - do *wstr++ = (char)(48 + (uvalue % 10)); while((uvalue /= 10) && uvalue > (unsigned long long)0xffffffff); + do *wstr++ = (char)('0' + (uvalue % 10)); while((uvalue /= 10) && uvalue > (unsigned long long)0xffffffff); if(uvalue) return print_calculated_number_lu_r(wstr, uvalue); return wstr; } @@ -164,7 +164,7 @@ int print_calculated_number(char *str, calculated_number value) else wstr = print_calculated_number_lu_r(str, uvalue); #else - do *wstr++ = (char)(48 + (uvalue % 10)); while(uvalue /= 10); + do *wstr++ = (char)('0' + (uvalue % 10)); while(uvalue /= 10); #endif // make sure we have 6 bytes at least |