From: Scott Baker Date: Sat, 5 Jun 2021 17:30:21 +0000 (-0700) Subject: Update humanSize() to skip the big numbers (it requires 64 bit) X-Git-Tag: v1.5.1~1^2~149^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64385ef7cbb3388ceacb7611f29b2f0a03bdf477;p=thirdparty%2Fzstd.git Update humanSize() to skip the big numbers (it requires 64 bit) --- diff --git a/programs/util.c b/programs/util.c index e7acc6cbb..c2883ba7d 100644 --- a/programs/util.c +++ b/programs/util.c @@ -122,11 +122,15 @@ int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg, ***************************************/ char* humanSize(unsigned long size, char* str) { + /* This only works on 64 bit platforms so I commented it out for now */ + /* if (size > 1125899906842624L) { snprintf(str, 7, "%.1fP", (float)size / 1125899906842624L); } else if (size > 1099511627776L) { snprintf(str, 7, "%.1fT", (float)size / 1099511627776L); - } else if (size > 1073741824L) { + */ + + if (size > 1073741824L) { snprintf(str, 7, "%.1fG", (float)size / 1073741824L); } else if (size > 1048576L) { snprintf(str, 7, "%.1fM", (float)size / 1048576L);