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
1 changed files with 2 additions and 2 deletions

View File

@ -336,7 +336,7 @@ static bool VerifyJumpTarget(PClassActor *cls, FState *CallingState, int index)
FState *FStateLabelStorage::GetState(int pos, PClassActor *cls, bool exact)
{
if (pos > 0x10000000)
if (pos >= 0x10000000)
{
return cls? cls->FindState(ENamedName(pos - 0x10000000)) : nullptr;
}
@ -1142,4 +1142,4 @@ DEFINE_ACTION_FUNCTION(FState, ValidateSpriteFrame)
{
PARAM_SELF_STRUCT_PROLOGUE(FState);
ACTION_RETURN_BOOL(self->Frame < sprites[self->sprite].numframes);
}
}