diff --git a/matrix.c b/matrix.c index 41f1d40..f6c0d81 100644 --- a/matrix.c +++ b/matrix.c @@ -108,6 +108,7 @@ Matrix add(const Matrix matrix1, const Matrix matrix2) outputMatrix.buffer[i-1+ outputMatrix.rows*(j-1)] = matrix1.buffer[i-1 + matrix1.rows*(j-1)] + matrix2.buffer[i-1 + matrix2.rows *(j-1)]; } } + return outputMatrix; } else { //the matrix could not be added, since the matrix sizes are not set correct. Matrix m;