Skip to content
Snippets Groups Projects
Commit 6825e3a5 authored by Ben Cumming's avatar Ben Cumming
Browse files

fix range error in forwarding cable constructor

parent f95e3579
No related branches found
No related tags found
No related merge requests found
......@@ -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"
);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment