From e0f192f77493425c01dc78e1ca6a7ec66464d7cf Mon Sep 17 00:00:00 2001 From: = Date: Thu, 20 Nov 2025 16:29:02 +0100 Subject: [PATCH] added return value to add function in matrix.c --- matrix.c | 1 + 1 file changed, 1 insertion(+) 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;