diff --git a/src/cell.hpp b/src/cell.hpp index 214a5b3c9ba090a2c38e007b50f1594512d53268..b3970ce0bbb2aa78fab1fcc1b3e9c6e375292e08 100644 --- a/src/cell.hpp +++ b/src/cell.hpp @@ -101,7 +101,7 @@ namespace nestmc { void cell::add_cable(cell::index_type parent, Args ...args) { // check for a valid parent id - if(parent>num_segments()) { + if(parent>=num_segments()) { throw std::out_of_range( "parent index of cell segment is out of range" );