create matrix update wip

This commit is contained in:
Niklas Wolf 2025-11-10 15:33:39 +01:00
parent f0bc0ce06a
commit 3a72794684

View File

@ -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;