Merge pull request #35887 from dankan1890/quick_fix

Fixed String::humanize_size crash.
This commit is contained in:
Rémi Verschelde 2020-02-06 10:29:00 +01:00 committed by GitHub
commit f120acceb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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