This commit is contained in:
fischerch103508 committed 2026-11-04 23:13:45 +01:00
1 parent 1271805bb5
commit 86b35bb735
1 file changed
+7
+7
View File
@@ -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)