浏览代码

Fix potential index out of bounds

Johan Mattsson 2 年之前
父节点
当前提交
2e1cfe9332
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Engine/source/T3D/shapeImage.cpp

+ 1 - 1
Engine/source/T3D/shapeImage.cpp

@@ -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];