added return value to add function in matrix.c

This commit is contained in:
= 2025-11-20 16:29:02 +01:00
parent 4da0a796c1
commit e0f192f774

View File

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