- added validation of game skill when changing a level

This commit is contained in:
alexey.lysiuk 2020-04-20 13:32:02 +03:00 committed by drfrag
parent c6514e4438
commit 1e9f0700f0

View file

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