- added validation of game skill when changing a level

This commit is contained in:
alexey.lysiuk 2020-04-20 13:32:02 +03:00
parent a9c0765fe1
commit c37dcc6eb4

View file

@ -634,8 +634,7 @@ void FLevelLocals::ChangeLevel(const char *levelname, int position, int inflags,
nextlevel = levelname;
}
if (nextSkill != -1)
NextSkill = nextSkill;
NextSkill = (unsigned)nextSkill < AllSkills.Size() ? nextSkill : -1;
if (inflags & CHANGELEVEL_NOINTERMISSION)
{