fix(strings): fix fill character cannot be defaulted

This commit is contained in:
Redstone1024 2025-01-07 22:09:53 +08:00
parent 594acf219a
commit 68cd2c310a

View File

@ -549,12 +549,17 @@ public:
{
if (Iter == Sent) break;
if (*Iter != LITERAL(FCharType, '<') && *Iter != LITERAL(FCharType, '^') && *Iter != LITERAL(FCharType, '>')) break;
// If the fill character is specified.
if (*Iter == LITERAL(FCharType, '<') || *Iter == LITERAL(FCharType, '^') || *Iter == LITERAL(FCharType, '>'))
{
FillUnitLength = 1;
FillCharacter[0] = Char;
FillUnitLength = 1;
FillCharacter[0] = Char;
Char = *Iter; ++Iter;
}
Char = *Iter; ++Iter;
// If the fill character is not specified and the align option is not specified.
else if (Char != LITERAL(FCharType, '<') && Char != LITERAL(FCharType, '^') && Char != LITERAL(FCharType, '>')) break;
AlignOption = Char;
@ -1232,12 +1237,17 @@ public:
{
if (Iter == Sent) break;
if (*Iter != LITERAL(FCharType, '<') && *Iter != LITERAL(FCharType, '^') && *Iter != LITERAL(FCharType, '>')) break;
// If the fill character is specified.
if (*Iter == LITERAL(FCharType, '<') || *Iter == LITERAL(FCharType, '^') || *Iter == LITERAL(FCharType, '>'))
{
FillUnitLength = 1;
FillCharacter[0] = Char;
FillUnitLength = 1;
FillCharacter[0] = Char;
Char = *Iter; ++Iter;
}
Char = *Iter; ++Iter;
// If the fill character is not specified and the align option is not specified.
else if (Char != LITERAL(FCharType, '<') && Char != LITERAL(FCharType, '^') && Char != LITERAL(FCharType, '>')) break;
bHasFillAndAlign = true;