From 2396b5867b2d4ac73d9d47c8de3b227a117aa1c5 Mon Sep 17 00:00:00 2001 From: stammjo100588 Date: Mon, 10 Nov 2025 15:27:25 +0100 Subject: [PATCH] Additional fix to getMatrix --- matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix.c b/matrix.c index 2db66ea..d06b036 100644 --- a/matrix.c +++ b/matrix.c @@ -42,7 +42,7 @@ void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int colIdx) { if(rowIdx < matrix.rows && colIdx < matrix.cols){ - return matrix.buffer[rowIdx * matrix.cols + colIdx]; + return matrix.buffer[rowIdx * matrix.cols + colIdx]; //ACHTUNG! rowIdx und colIDX sind in Array position gedacht! matrix.cols ist normal gedacht! }else{ return 0; }