Fix Pull Request Review 2346387627

This commit is contained in:
BinarryCode 2024-10-04 16:48:28 -07:00 committed by Rachael Alexanderson
parent 27c6d34537
commit aa5ae5759a
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -490,6 +490,11 @@ void SBarInfo::ParseSBarInfo(int lump)
continue; continue;
} }
int baselump = -2; int baselump = -2;
FString SBarInfoTopLevelString;
if(sc.GetString(SBarInfoTopLevelString))
{ // Store the string if the next token is a string, and revert scanner state afterwards
sc.UnGet();
}
switch(sc.MustMatchString(SBarInfoTopLevel)) switch(sc.MustMatchString(SBarInfoTopLevel))
{ {
case SBARINFO_BASE: case SBARINFO_BASE:
@ -642,7 +647,7 @@ void SBarInfo::ParseSBarInfo(int lump)
barNum = sc.MustMatchString(StatusBars); barNum = sc.MustMatchString(StatusBars);
} }
// SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists. // SBARINFO_APPENDSTATUSBAR shouldn't delete the old HUD if it exists.
const bool append = (sc.MustMatchString(SBarInfoTopLevel) == SBARINFO_APPENDSTATUSBAR); const bool append = (SBarInfoTopLevelString.CompareNoCase("appendstatusbar") == 0);
if (!append) if (!append)
{ {
if (this->huds[barNum] != NULL) if (this->huds[barNum] != NULL)