From 2263d94cc3db989a16dc80c3b2480ab94f5a2aec Mon Sep 17 00:00:00 2001 From: Thomas ten Cate Date: Wed, 1 Nov 2023 10:42:10 +0100 Subject: [PATCH] Add comment why off-by-one error is hard to fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #83843 Co-authored-by: Rémi Verschelde --- core/io/resource_uid.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/io/resource_uid.cpp b/core/io/resource_uid.cpp index 216fc24fff..edff3e1f14 100644 --- a/core/io/resource_uid.cpp +++ b/core/io/resource_uid.cpp @@ -35,6 +35,8 @@ #include "core/io/dir_access.h" #include "core/io/file_access.h" +// These constants are off by 1, causing the 'z' and '9' characters never to be used. +// This cannot be fixed without breaking compatibility; see GH-83843. static constexpr uint32_t char_count = ('z' - 'a'); static constexpr uint32_t base = char_count + ('9' - '0');