diff --git a/src/p_states.cpp b/src/p_states.cpp index c1e3e79c2..133ac4ad6 100644 --- a/src/p_states.cpp +++ b/src/p_states.cpp @@ -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); -} \ No newline at end of file +}