fix superscript 1

This commit is contained in:
hugogogo
2026-05-15 02:29:53 +02:00
parent e95f55c07f
commit 71806cb923

View File

@@ -32,8 +32,10 @@ long long ft_atoll_superscript(const char *str)
int digit;
if (superscript_size == 2)
{
// ² (U+00B2) or ³ (U+00B3)
if ((uint8_t)str[i + 1] == 0xB2)
// ¹ (U+00B9), ² (U+00B2), or ³ (U+00B3)
if ((uint8_t)str[i + 1] == 0xB9)
digit = 1;
else if ((uint8_t)str[i + 1] == 0xB2)
digit = 2;
else if ((uint8_t)str[i + 1] == 0xB3)
digit = 3;