From 63b5622efb143114e7d487e484df91e1ac95f6f5 Mon Sep 17 00:00:00 2001 From: Steven Guido Date: Mon, 16 Feb 2026 09:40:15 +0900 Subject: [PATCH] fix additional off by one error --- OndselSolver/GEFullMat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OndselSolver/GEFullMat.cpp b/OndselSolver/GEFullMat.cpp index afe470b..c59d74c 100644 --- a/OndselSolver/GEFullMat.cpp +++ b/OndselSolver/GEFullMat.cpp @@ -24,7 +24,7 @@ void GEFullMat::backSubstituteIntoDU() for (ssize_t i = (ssize_t)n - 2; i >= 0; i--) //Use ssize_t because of decrement { auto rowi = matrixA->at(i); - double sum = answerX->at(n) * rowi->at(n); + double sum = answerX->at(n - 1) * rowi->at(n - 1); for (size_t j = i + 1; j < n - 1; j++) { sum += answerX->at(j) * rowi->at(j);