From 3a7279468498df35fd8045ed334ded8800310814 Mon Sep 17 00:00:00 2001 From: Niklas Wolf Date: Mon, 10 Nov 2025 15:33:39 +0100 Subject: [PATCH] create matrix update wip --- matrix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/matrix.c b/matrix.c index b6dcaca..e430469 100644 --- a/matrix.c +++ b/matrix.c @@ -13,15 +13,15 @@ Matrix createMatrix(unsigned int rows, unsigned int cols) if(rows == 0 || cols == 0) { - return m; + printf("Error"); + exit(EXIT_FAILURE); } m.data = calloc(rows * cols, sizeof(MatrixType)); if (m.data == NULL) { - m.rows = 0; - m.cols = 0; - return m; + printf("Error"); + exit(EXIT_FAILURE); } return m;