Fix RichTextLabel [ol type=a] not generating the right prefix

This commit is contained in:
qqwobble
2026-03-05 13:55:38 +01:00
parent c53c5a1f49
commit 754eb7808a
+6 -7
View File
@@ -261,11 +261,11 @@ String RichTextLabel::_roman(int p_num, bool p_capitalize) const {
}
String RichTextLabel::_letters(int p_num, bool p_capitalize) const {
int64_t n = p_num;
uint64_t n = p_num;
int chars = 0;
do {
n /= 24;
n = (n - 1) / 26;
chars++;
} while (n);
@@ -275,11 +275,10 @@ String RichTextLabel::_letters(int p_num, bool p_capitalize) const {
c[chars] = 0;
n = p_num;
do {
int mod = Math::abs(n % 24);
char a = (p_capitalize ? 'A' : 'a');
c[--chars] = a + mod - 1;
n /= 24;
const char a = (p_capitalize ? 'A' : 'a');
n = n - 1;
c[--chars] = a + n % 26;
n /= 26;
} while (n);
return s;