made FCommandLine::operator[] return a const char * and fixed two places where this triggered a compile error.

This commit is contained in:
Christoph Oelckers 2024-10-19 13:22:30 +02:00
commit e81d563cf4
4 changed files with 5 additions and 6 deletions

View file

@ -100,12 +100,11 @@ CCMD (addkeysection)
}
// Limit the ini name to 32 chars
if (strlen (argv[2]) > 32)
argv[2][32] = 0;
FString name(argv[2], 32);
for (unsigned i = 0; i < KeySections.Size(); i++)
{
if (KeySections[i].mTitle.CompareNoCase(argv[2]) == 0)
if (KeySections[i].mTitle.CompareNoCase(name) == 0)
{
CurrentKeySection = i;
return;