Minor: Fix displaying formatted bytes. Use K-units on 1024 factor.

This commit is contained in:
Ansgar Becker
2007-07-26 06:11:48 +00:00
parent 5cecd6a91e
commit c83bcb5315

View File

@@ -1919,11 +1919,11 @@ function FormatByteNumber( Bytes: Int64; Decimals: Byte = 1 ): String;
const
KB = 1024;
begin
if Bytes > KB *KB *KB then
if Bytes >= KB *KB *KB then
Result := FormatNumber( Bytes / (KB *KB *KB), Decimals ) + ' GB'
else if Bytes > KB *KB then
else if Bytes >= KB *KB then
Result := FormatNumber( Bytes / (KB *KB), Decimals ) + ' MB'
else if Bytes > KB then
else if Bytes >= KB then
Result := FormatNumber( Bytes / KB, Decimals ) + ' KB'
else
Result := FormatNumber( Bytes ) + ' Bytes'