From 4cd63820484969e4b651fe6b4d90623c497628fc Mon Sep 17 00:00:00 2001 From: ThorstenZirwes Date: Tue, 4 Feb 2025 22:29:24 +0100 Subject: [PATCH] Fix unsigned integer check in Solution.h --- include/cantera/base/Solution.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cantera/base/Solution.h b/include/cantera/base/Solution.h index 136eca8ca..1ffe4c82a 100644 --- a/include/cantera/base/Solution.h +++ b/include/cantera/base/Solution.h @@ -115,8 +115,8 @@ public: //! Get the name of an adjacent phase by index string adjacentName(size_t i) const { - if (i < 0 || i >= m_adjacent.size()) { - throw CanteraError("Solution::adjacentName", "Invalid index {}.", i); + if (i >= m_adjacent.size()) { + throw IndexError("Solution::adjacentName", "m_adjacent", i, m_adjacent.size()-1); } return m_adjacent.at(i)->name(); }