From c13182b77f8597850238d043875c1c3130877e07 Mon Sep 17 00:00:00 2001 From: localhorst Date: Thu, 6 Aug 2020 11:51:13 +0200 Subject: [PATCH] fixed capacity display --- src/drive.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drive.cpp b/src/drive.cpp index 661f538..f816cda 100644 --- a/src/drive.cpp +++ b/src/drive.cpp @@ -47,13 +47,13 @@ uint32_t Drive::getPowerCycles(void) } string Drive::sCapacityToText() { - if(getCapacity() <= (999*1000000000U)) { + if(getCapacity() <= (999*1000000000UL)) { // Less or even 999 GB --> GB - return to_string(getCapacity() / 1000000000U) + " GB"; + return to_string(getCapacity() / 1000000000UL) + " GB"; } else { // More 999 GB --> TB - return to_string(getCapacity() / 1000000000000U) + " TB"; + return to_string(getCapacity() / 1000000000000UL) + " TB"; } return "ERROR"; }