diff options
Diffstat (limited to 'num.c')
-rw-r--r-- | num.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -87,27 +87,30 @@ int main(int argc, char *argv[]) for(f = 1; f < argc; f++) { num = strtoull(argv[f], NULL, 0); - snum=(signed long long)num; if (num < 0x100ull) { h_width = 2; b_width = 8; + snum=(signed char)num; } else if (num < 0x10000ull) { h_width = 4; b_width = 16; + snum=(signed short)num; } else if (num < 0x100000000ull) { h_width = 8; b_width = 32; + snum=(signed long)num; } else { h_width = 16; b_width = 64; + snum=(signed long long)num; } printf("Original : %s\n", argv[f]); |