From b7b8831f7194dd587dc1059d409cbbe63b0b245d Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 16 Feb 2011 22:33:44 +0000 Subject: [PATCH] fixed bug for hash size display git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4040 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/fimonitor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 58903daff..1975dab30 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -780,7 +780,7 @@ void FileIndexMonitor::updateCycle() static std::string friendlyUnit(uint64_t val) { - const std::string units[4] = {"B","KB","MB","GB"}; + const std::string units[5] = {"B","KB","MB","GB","TB"}; char buf[50] ; double fact = 1.0 ; @@ -794,7 +794,7 @@ static std::string friendlyUnit(uint64_t val) else fact *= 1024.0f ; - sprintf(buf,"%2.2f",double(val)/fact) ; + sprintf(buf,"%2.2f",double(val)/fact*1024.0f) ; return std::string(buf) + " TB"; }