From 1322b7e49d982c9bfd364507380b86bce014e26e Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 6 Sep 2012 14:33:40 +0000 Subject: [PATCH] Fixed size checking bug --- gtsam/inference/FactorGraph-inl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/inference/FactorGraph-inl.h b/gtsam/inference/FactorGraph-inl.h index 97a7fa1c6..04490dbc6 100644 --- a/gtsam/inference/FactorGraph-inl.h +++ b/gtsam/inference/FactorGraph-inl.h @@ -100,7 +100,7 @@ namespace gtsam { ++ firstIndex; // Check that number of variables is in bounds - if(firstIndex + nFrontals >= variableIndex.size()) + if(firstIndex + nFrontals > variableIndex.size()) throw std::invalid_argument("Requested to eliminate more frontal variables than exist in the factor graph."); // Get set of involved factors