From ca7b7ccf03f0cadfcac005e30d726ebb959c9980 Mon Sep 17 00:00:00 2001 From: martii Date: Mon, 6 Jan 2014 13:23:39 +0100 Subject: [PATCH] gui/dboxinfo: fix bytes2string() Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/88392567938a0c7e0045c8a8e7583279a7d04480 Author: martii Date: 2014-01-06 (Mon, 06 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/dboxinfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/dboxinfo.cpp b/src/gui/dboxinfo.cpp index 08bad63bb..b7d90ca5a 100644 --- a/src/gui/dboxinfo.cpp +++ b/src/gui/dboxinfo.cpp @@ -181,10 +181,10 @@ static std::string bytes2string(uint64_t bytes, bool binary) char result[80]; if (b < base) - snprintf(result, sizeof(result), "%d%s%02d ", (int)b, g_Locale->getText(LOCALE_UNIT_DECIMAL), - (int)((bytes - b * factor) * 100 / factor)); + snprintf(result, sizeof(result), "%llu%s%02llu ", b, g_Locale->getText(LOCALE_UNIT_DECIMAL), + (bytes - b * factor) * 100 / factor); else // no need for fractions for larger numbers - snprintf(result, sizeof(result), "%d ", (int)bytes); + snprintf(result, sizeof(result), "%llu ", b); std::string res(result); if (*unit) {