Skip to content

Commit

Permalink
Add comment why off-by-one error is hard to fix
Browse files Browse the repository at this point in the history
See #83843

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
  • Loading branch information
ttencate and akien-mga committed Nov 1, 2023
1 parent 6afd320 commit 2263d94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/io/resource_uid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 2263d94

Please sign in to comment.