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"; }