Fixing ArrayOut of bound in FormattedName (regression)
This commit is contained in:
@ -192,12 +192,14 @@ FString FDTFluxParticipant::GetFormattedName(const int MaxChar, const FString& S
|
||||
}
|
||||
return FullName.Left(MaxChar) + OverflowChar;
|
||||
}
|
||||
FString FirstName = Teammate[0].FirstName;
|
||||
FString LastName = Teammate[0].LastName;
|
||||
FString Initial;
|
||||
if (!Teammate[0].FirstName.IsEmpty())
|
||||
if (!FirstName.IsEmpty())
|
||||
{
|
||||
Initial = Teammate[0].FirstName.Left(1).ToUpper() + Separator;
|
||||
Initial = FirstName.Left(1).ToUpper() + Separator;
|
||||
}
|
||||
const FString FormattedLastName = Teammate[0].LastName.ToUpper();
|
||||
const FString FormattedLastName = LastName.ToUpper();
|
||||
FString FullName = Initial + FormattedLastName;
|
||||
if (FullName.Len() <= MaxChar)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user