1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Author: Michael Karcher <debian@mkarcher.dialup.fu-berlin.de>
Description: This patch fixes a portability issue about printing big numbers.
--- unace-nonfree-2.5.orig/source/apps/exe/convert/convert.c
+++ unace-nonfree-2.5/source/apps/exe/convert/convert.c
@@ -31,7 +31,7 @@ INT StrLen,
ByteSize = (ByteSize / 1000000) * 100000000 + (ByteSize / 1000) * 10000
+ ByteSize % 1000;
- sprintf(Str, "%lld ", ByteSize);
+ sprintf(Str, "%llu ", (unsigned long long)ByteSize);
StrLen = strlen(Str) - 1;
Str[StrLen] = UNITCHARS[UnitCharNumber];
@@ -117,12 +117,12 @@ INT UnitCharNumber;
if (UnitCharNumber)
{
- sprintf(SizeStr, "%8lld ", Size);
+ sprintf(SizeStr, "%8llu ", (unsigned long long)Size);
SizeStr[strlen(SizeStr) - 1] = UNITCHARS[UnitCharNumber];
}
else
{
- sprintf(SizeStr, "%9lld", Size);
+ sprintf(SizeStr, "%9llu", (unsigned long long)Size);
}
}
|