From 37249cf738dad0b5237bbeef3a0817419df772f2 Mon Sep 17 00:00:00 2001 From: Doug Shi-Dong Date: Thu, 14 Dec 2023 00:55:51 -0500 Subject: [PATCH] Fix ROL_Constraint_Partitioned_Def.hpp bound check --- .../src/function/constraint/ROL_Constraint_Partitioned_Def.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rol/src/function/constraint/ROL_Constraint_Partitioned_Def.hpp b/packages/rol/src/function/constraint/ROL_Constraint_Partitioned_Def.hpp index 520f636c61dd..dfc30cfa1194 100644 --- a/packages/rol/src/function/constraint/ROL_Constraint_Partitioned_Def.hpp +++ b/packages/rol/src/function/constraint/ROL_Constraint_Partitioned_Def.hpp @@ -66,7 +66,7 @@ int Constraint_Partitioned::getNumberConstraintEvaluations(void) const { template Ptr> Constraint_Partitioned::get(int ind) const { - if (ind < 0 || ind > static_cast(cvec_.size())) { + if (ind < 0 || ind >= static_cast(cvec_.size())) { throw Exception::NotImplemented(">>> Constraint_Partitioned::get : Index out of bounds!"); } return cvec_[ind];