mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 23:32:02 +00:00
Fixed crash on attempt to get actor state named 'None'
https://forum.zdoom.org/viewtopic.php?t=57885
This commit is contained in:
parent
e6b6cb354b
commit
e081a0d810
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -1142,4 +1142,4 @@ DEFINE_ACTION_FUNCTION(FState, ValidateSpriteFrame)
|
||||||
{
|
{
|
||||||
PARAM_SELF_STRUCT_PROLOGUE(FState);
|
PARAM_SELF_STRUCT_PROLOGUE(FState);
|
||||||
ACTION_RETURN_BOOL(self->Frame < sprites[self->sprite].numframes);
|
ACTION_RETURN_BOOL(self->Frame < sprites[self->sprite].numframes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue