From e062f848f8985b2cf7b1fd80c6e071a0d67647c9 Mon Sep 17 00:00:00 2001 From: Angelos Date: Thu, 12 Nov 2026 09:51:40 +0100 Subject: [PATCH] =?UTF-8?q?1unit=20test=20fail=20gel=C3=B6st?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Startcode/matrix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Startcode/matrix.c b/Startcode/matrix.c index ea977a5..174b34f 100644 --- a/Startcode/matrix.c +++ b/Startcode/matrix.c @@ -6,6 +6,9 @@ Matrix createMatrix(unsigned int rows, unsigned int cols) { + if (rows == 0 || cols == 0) { + return (Matrix){0}; // Setzt rows, cols und den Puffer auf 0/NULL + } Matrix m; m.rows = rows; m.cols = cols;