Fix potential index out of bounds

This commit is contained in:
Johan Mattsson 2023-03-04 22:05:43 +01:00 committed by GitHub
parent 2efd5f0acd
commit 2e1cfe9332
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -576,7 +576,7 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr)
void ShapeBaseImageData::handleStateSoundTrack(const U32& stateId)
{
if (stateId > MaxStates)
if (stateId >= MaxStates)
return;
StateData& s = state[stateId];