From 35823e6063dba70c51297962f1a393570bc1c031 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Mon, 5 Aug 2024 13:06:16 +0200 Subject: [PATCH] type of mechanism should not be < 0 (#3026) --- src/neuron/model_data.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neuron/model_data.hpp b/src/neuron/model_data.hpp index 9d71d80074..8909aa01cc 100644 --- a/src/neuron/model_data.hpp +++ b/src/neuron/model_data.hpp @@ -124,7 +124,7 @@ struct Model { private: container::Mechanism::storage& mechanism_data_impl(int type) const { - if (0 <= type && type >= m_mech_data.size()) { + if (type < 0 || type >= m_mech_data.size()) { throw std::runtime_error("mechanism_data(" + std::to_string(type) + "): type out of range"); }