diff --git a/Startcode/matrix.c b/Startcode/matrix.c index 07a2309..d9186c7 100644 --- a/Startcode/matrix.c +++ b/Startcode/matrix.c @@ -36,7 +36,7 @@ void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned MatrixType getMatrixAt(const Matrix matrix, unsigned int rowIdx, unsigned int colIdx) { - return matrix.storage[getMatrixIndex(matrix->cols, rowIdx, colIdx)]; + return matrix.storage[getMatrixIndex(matrix.cols, rowIdx, colIdx)]; } Matrix add(const Matrix matrix1, const Matrix matrix2) @@ -44,7 +44,7 @@ Matrix add(const Matrix matrix1, const Matrix matrix2) if (matrix1.rows != matrix2.rows || matrix1.cols != matrix2.cols) { fprintf(stderr, "Fehler: Dimensionen stimmen nicht überein (%ux%u und %ux%u)\n", - matrix1->rows, matrix1->cols, matrix2->rows, matrix2->cols); + matrix1.rows, matrix1.cols, matrix2.rows, matrix2.cols); return (Matrix){ .rows = 0, .cols = 0, .storage = NULL }; }