mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-19 08:01:50 +00:00
fix bad assert in GetStateLabelIndex.
This commit is contained in:
parent
0c5780cc41
commit
6777423d23
1 changed files with 4 additions and 2 deletions
|
@ -506,8 +506,10 @@ int FStateDefinitions::GetStateLabelIndex (FName statename)
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
assert((size_t)std->State <= StateArray.Size() + 1);
|
||||
return (int)((ptrdiff_t)std->State - 1);
|
||||
if ((size_t)std->State <= StateArray.Size() + 1)
|
||||
return (int)((ptrdiff_t)std->State - 1);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue