From c83bcb5315bf424af2cd24c362395c12cafea0e0 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 26 Jul 2007 06:11:48 +0000 Subject: [PATCH] Minor: Fix displaying formatted bytes. Use K-units on 1024 factor. --- source/helpers.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/helpers.pas b/source/helpers.pas index 3a49275f..9366c426 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -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'