From c7c68a0ce0512d9a7ff775557f4ad6a90dbdc28d Mon Sep 17 00:00:00 2001 From: Jonas Date: Thu, 13 Nov 2025 23:52:53 +0100 Subject: [PATCH] fixed setMatrixAt --- I2_NeuronalerAbsturz/Start_Mac/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/I2_NeuronalerAbsturz/Start_Mac/matrix.c b/I2_NeuronalerAbsturz/Start_Mac/matrix.c index cc40200..2a98af6 100644 --- a/I2_NeuronalerAbsturz/Start_Mac/matrix.c +++ b/I2_NeuronalerAbsturz/Start_Mac/matrix.c @@ -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; }