bugfix/ai-static-analysis #82
@ -62,6 +62,10 @@ string Drive::sCapacityToText()
|
||||
dSize /= 1000;
|
||||
u16UnitIndex++;
|
||||
}
|
||||
if (u16UnitIndex >= 9)
|
||||
{
|
||||
u16UnitIndex = 8;
|
||||
}
|
||||
int precision = (u16UnitIndex >= 3) ? (u16UnitIndex - 3) : 0;
|
||||
sprintf(acBuffer, "%.*f %s", precision, dSize, units[u16UnitIndex]);
|
||||
return acBuffer;
|
||||
|
||||
Reference in New Issue
Block a user