Fix UnitsToText to properly print string with 2 decimal places

This commit is contained in:
Wojtek Figat
2023-10-19 15:16:14 +02:00
parent 6f60218bec
commit a989173e2d

View File

@@ -54,7 +54,7 @@ namespace Utilities
dblSUnits = units / static_cast<double>(divider);
if (i >= sizes.Length())
i = 0;
return String::Format(TEXT("{0} {1}"), RoundTo2DecimalPlaces(dblSUnits), sizes[i]);
return String::Format(TEXT("{0:.2f} {1}"), RoundTo2DecimalPlaces(dblSUnits), sizes[i]);
}
// Converts size of the file (in bytes) to the best fitting string