mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +00:00
- Fixed a very old bug in LookupLevelName code.
If the map name neither matched 'ExMy', 'MAPxy' or 'LEVELxy', 'checkstring' was left uninitialized before using as argument to 'strstr', leading to undefined results. Spotted with Valgrind.
This commit is contained in:
parent
c75a762e7e
commit
4217c2ccd6
1 changed files with 4 additions and 0 deletions
|
@ -312,6 +312,10 @@ FString level_info_t::LookupLevelName()
|
|||
{
|
||||
mysnprintf (checkstring, countof(checkstring), "%d: ", atoi(&MapName[5]));
|
||||
}
|
||||
else
|
||||
{
|
||||
checkstring[0] = '\0';
|
||||
}
|
||||
thename = strstr (lookedup, checkstring);
|
||||
if (thename == NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue