diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-06 10:29:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 10:29:00 +0100 |
commit | f120acceb87ff91a701abd8b1af686be5cfb326e (patch) | |
tree | d7a77486b106632e8aa4fef299ea02edb3580c55 | |
parent | 449656bcbbcd1db314d9e98820240032451484fa (diff) | |
parent | ca0ee767cb5f93420b456fa47422ae2b3e266b4f (diff) |
Merge pull request #35887 from dankan1890/quick_fix
Fixed String::humanize_size crash.
-rw-r--r-- | core/ustring.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 8a1fbfd383..08418463a0 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3324,7 +3324,7 @@ String String::humanize_size(uint64_t p_size) { 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; prefix_idx++; } |