From 746bfc366244373b8d385b3761e14cb2c9eaa1fc Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 8 Jun 2019 21:57:55 +0200 Subject: Fix display of large sizes in the editor monitors Unlike the old custom method, the `String::humanize_size()` method works well with file sizes above 2 GB. This also tweaks the suffixes for spacing consistency and uses the correct acronym for exabytes (EB). This closes #29610. --- core/ustring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/ustring.cpp') diff --git a/core/ustring.cpp b/core/ustring.cpp index 88b758e883..f62e1b381b 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3235,7 +3235,7 @@ static int _humanize_digits(int p_num) { String String::humanize_size(size_t p_size) { uint64_t _div = 1; - static const char *prefix[] = { " Bytes", " KB", " MB", " GB", "TB", " PB", "HB", "" }; + static const char *prefix[] = { " Bytes", " KB", " MB", " GB", " TB", " PB", " EB", "" }; int prefix_idx = 0; while (p_size > (_div * 1024) && prefix[prefix_idx][0]) { -- cgit v1.2.3