From 86b35bb735babceabff92eef72d11664f569e94a Mon Sep 17 00:00:00 2001 From: ChristophFischer Date: Wed, 4 Nov 2026 23:13:45 +0100 Subject: [PATCH] synch --- Startcode/matrix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Startcode/matrix.c b/Startcode/matrix.c index 7908656..e7689c1 100644 --- a/Startcode/matrix.c +++ b/Startcode/matrix.c @@ -10,6 +10,13 @@ Matrix createMatrix(unsigned int rows, unsigned int cols) m.buffer = calloc(rows*cols, sizeof(MatrixType)); m.rows = rows; m.cols = cols; + + if( rows <= 0 || cols <= 0) + { + m.rows = 0; + m.cols = 0; + } + return m; } void clearMatrix(Matrix *matrix)