diff options
author | Jasper | 2025-09-09 11:39:38 +0200 |
---|---|---|
committer | Jasper | 2025-09-09 11:39:38 +0200 |
commit | f5b370aebd16f3d19475651b2672c4a33fe77580 (patch) | |
tree | 3ae13e7d74d76cb655e200b748e2c8580e8f8a4f | |
parent | 6997b40597e8f8bfc0226bdf0c83bb4108f02e6d (diff) |
Fixed memory issue in 'matrix_backsubst'
Freeing the resulting vector resulted in an 'invalid pointer'
exception.
-rw-r--r-- | matrix.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -357,7 +357,7 @@ Vector *matrix_backsubst(const Matrix *R, const Vector *y) double sum; - for (int i = x->m; i >= 0; --i) + for (int i = x->m - 1; i >= 0; --i) { sum = vector_at(y, i); for (size_t j = i + 1; j < x->m; ++j) |