added if clause to check for fittig matrix dimensions

This commit is contained in:
2025-11-12 12:56:34 +01:00
parent 6124b38e8d
commit 8d4b56f703
+3 -2
View File
@@ -54,7 +54,8 @@ Matrix multiply(const Matrix matrix1, const Matrix matrix2)
result.buffer[i][i] = value; result.buffer[i][i] = value;
} }
} }
return result; return result;
} }
printf("Die angegebenen Matrizen haben keine passenden Dimensionen für die Multiplikation");
return NULL;
}