fixed setMatrixAt

This commit is contained in:
Jonas Urban 2025-11-13 23:52:53 +01:00
parent c0760a6646
commit c7c68a0ce0

View File

@ -42,7 +42,7 @@ void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned
{
if (matrix.buffer != NULL)
{
if (rowIdx < matrix.rows || colIdx < matrix.cols)
if (rowIdx < matrix.rows && colIdx < matrix.cols)
{
matrix.buffer[rowIdx * matrix.cols + colIdx] = value;
}