diff --git a/matrix.c b/matrix.c index 79a87b3..324c138 100644 --- a/matrix.c +++ b/matrix.c @@ -25,7 +25,9 @@ Matrix createMatrix(unsigned int rows, unsigned int cols) void clearMatrix(Matrix *matrix) { - + matrix->rows = 0; + matrix->cols = 0; + matrix->buffer = NULL; } void setMatrixAt(MatrixType value, Matrix matrix, unsigned int rowIdx, unsigned int colIdx)