aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/numconvert.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/numconvert.c b/src/numconvert.c
index 17db6f1..16b7bb1 100644
--- a/src/numconvert.c
+++ b/src/numconvert.c
@@ -341,19 +341,12 @@ void my_print(int32_t opt, uintmax_t num, const char * order)
341 uintmax_t max; 341 uintmax_t max;
342 uintmax_t byte; 342 uintmax_t byte;
343 343
344 max = sizeof(intmax_t);
345 len = 0; 344 len = 0;
346 345
347 // determine padding 346 // determine padding
347 max = sizeof(intmax_t);
348 if (opt & MY_OPT_LIMIT) 348 if (opt & MY_OPT_LIMIT)
349 { 349 max = 4;
350 max = 1;
351 for(y = 0; y < (intmax_t)sizeof(intmax_t); y++)
352 if ( (num >> (y*8)) & 0xFF )
353 max = (y+1);
354 if (max < 2)
355 max = 4;
356 };
357 350
358 for(pos = 0; (pos < strlen(order)); pos++) 351 for(pos = 0; (pos < strlen(order)); pos++)
359 { 352 {