mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-27 22:42:29 +00:00
- fixed UMAPINFO episode parsing
* bounds checking for accessing episode tokens * support empty tokens in episode definition * handle upper cased episode shortcut https://forum.zdoom.org/viewtopic.php?t=65364
This commit is contained in:
parent
454fd288a0
commit
36ed7e5182
1 changed files with 17 additions and 3 deletions
|
@ -82,10 +82,13 @@ static FString ParseMultiString(FScanner &scanner, int error)
|
|||
}
|
||||
}
|
||||
|
||||
bool first = true;
|
||||
|
||||
do
|
||||
{
|
||||
scanner.MustGetToken(TK_StringConst);
|
||||
if (build.Len() > 0) build += "\n";
|
||||
if (first) first = false;
|
||||
else build += "\n";
|
||||
build += scanner.String;
|
||||
}
|
||||
while (scanner.CheckToken(','));
|
||||
|
@ -224,10 +227,21 @@ static int ParseStandardProperty(FScanner &scanner, UMapEntry *mape)
|
|||
// add the given episode
|
||||
FEpisode epi;
|
||||
|
||||
epi.mEpisodeName = strbin1(split[1]);
|
||||
if (split.Size() > 1)
|
||||
{
|
||||
epi.mEpisodeName = strbin1(split[1]);
|
||||
}
|
||||
if (split.Size() > 2 && split[2].IsNotEmpty())
|
||||
{
|
||||
split[2].ToLower();
|
||||
epi.mShortcut = split[2][0];
|
||||
}
|
||||
else
|
||||
{
|
||||
epi.mShortcut = '\0';
|
||||
}
|
||||
epi.mEpisodeMap = mape->MapName;
|
||||
epi.mPicName = split[0];
|
||||
epi.mShortcut = split[2][0];
|
||||
epi.mNoSkill = false;
|
||||
|
||||
unsigned i;
|
||||
|
|
Loading…
Reference in a new issue