d3dx9: Clamp register count for D3DXPC_MATRIX_COLUMNS.

This commit is contained in:
Rico Schüller 2013-09-18 23:16:33 +02:00 committed by Alexandre Julliard
parent e9bd764a7b
commit ae95176c0d
1 changed files with 1 additions and 1 deletions

View File

@ -1137,7 +1137,7 @@ static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device,
break; break;
case D3DXPC_MATRIX_COLUMNS: case D3DXPC_MATRIX_COLUMNS:
regcount = desc->Columns; regcount = min(desc->RegisterCount, desc->Columns);
if (inclass == D3DXPC_MATRIX_ROWS) rin = incol; if (inclass == D3DXPC_MATRIX_ROWS) rin = incol;
else cin = incol; else cin = incol;
regsize = desc->Rows; regsize = desc->Rows;