소스 검색

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