From 6825e3a5441cb1f0909224cfcd5c9aaec3eb5616 Mon Sep 17 00:00:00 2001 From: Ben Cumming <louncharf@gmail.com> Date: Fri, 1 Apr 2016 21:36:03 +0200 Subject: [PATCH] fix range error in forwarding cable constructor --- src/cell.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cell.hpp b/src/cell.hpp index 214a5b3c..b3970ce0 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" ); -- GitLab