Fixed String::humanize_size crash.

Close #35872

(cherry picked from commit ca0ee767cb)
This commit is contained in:
dankan1890 2020-02-03 17:59:24 +01:00 committed by Rémi Verschelde
parent 8030178e48
commit 7ccfbd61a4
1 changed files with 1 additions and 1 deletions

View File

@ -3324,7 +3324,7 @@ String String::humanize_size(uint64_t p_size) {
int prefix_idx = 0; int prefix_idx = 0;
while (prefix_idx < prefixes.size() && p_size > (_div * 1024)) { while (prefix_idx < prefixes.size() - 1 && p_size > (_div * 1024)) {
_div *= 1024; _div *= 1024;
prefix_idx++; prefix_idx++;
} }