diff --git a/tools/patcher/drlp_l1.cpp b/tools/patcher/drlp_l1.cpp index 2f5f7227b6a..346f48aa548 100644 --- a/tools/patcher/drlp_l1.cpp +++ b/tools/patcher/drlp_l1.cpp @@ -2563,7 +2563,7 @@ BYTE* DRLP_L5_PatchSpec(const BYTE* minBuf, size_t minLen, const BYTE* celBuf, s // if (frame.subtileIndex0 < 0) { // continue; // } - for (int n = 0; n < lengthof(frame.microIndices0); n++) { + for (int n = 0; n < lengthof(frame.microIndices0) && frame.subtileIndex0 >= 0; n++) { if (frame.microIndices0[n] < 0) { continue; }