Skip to content

Commit f410e7a

Browse files
authored
Merge pull request #29616 from Calinou/humanize-size-clearer-rounding
Make humanized size rounding clearer by padding decimals with zeroes
2 parents 4073da7 + 463d098 commit f410e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/ustring.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3232,7 +3232,7 @@ String String::humanize_size(size_t p_size) {
32323232
int digits = prefix_idx > 0 ? _humanize_digits(p_size / _div) : 0;
32333233
double divisor = prefix_idx > 0 ? _div : 1;
32343234

3235-
return String::num(p_size / divisor, digits) + prefix[prefix_idx];
3235+
return String::num(p_size / divisor).pad_decimals(digits) + prefix[prefix_idx];
32363236
}
32373237
bool String::is_abs_path() const {
32383238

0 commit comments

Comments
 (0)