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;