Fixed crash on attempt to get actor state named 'None'

https://forum.zdoom.org/viewtopic.php?t=57885
This commit is contained in:
alexey.lysiuk 2017-09-17 11:25:55 +03:00
parent e6b6cb354b
commit e081a0d810

View file

@ -336,7 +336,7 @@ static bool VerifyJumpTarget(PClassActor *cls, FState *CallingState, int index)
FState *FStateLabelStorage::GetState(int pos, PClassActor *cls, bool exact) FState *FStateLabelStorage::GetState(int pos, PClassActor *cls, bool exact)
{ {
if (pos > 0x10000000) if (pos >= 0x10000000)
{ {
return cls? cls->FindState(ENamedName(pos - 0x10000000)) : nullptr; return cls? cls->FindState(ENamedName(pos - 0x10000000)) : nullptr;
} }