Skip to content

Commit

Permalink
type of mechanism should not be < 0 (#3026)
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino authored Aug 5, 2024
1 parent 72f9ec4 commit 35823e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/neuron/model_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 35823e6

Please sign in to comment.