Fix #6398 for DX9 as well

This commit is contained in:
Henrik Rydgard 2015-03-01 16:15:13 +01:00
parent d505ad14c4
commit 69e099e615

View File

@ -433,6 +433,12 @@ void TransformDrawEngineDX9::DecodeVertsStep() {
}
const int vertexCount = indexUpperBound - indexLowerBound + 1;
// This check is a workaround for Pangya Fantasy Golf, which sends bogus index data when switching items in "My Room" sometimes.
if (decodedVerts_ + vertexCount > VERTEX_BUFFER_MAX) {
return;
}
// 3. Decode that range of vertex data.
dec_->DecodeVerts(decoded + decodedVerts_ * (int)dec_->GetDecVtxFmt().stride,
dc.verts, indexLowerBound, indexUpperBound);