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; }