Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
heplesser committed Jun 4, 2024
1 parent 98a2aef commit 6e35ed1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nestkernel/node_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,8 @@ NodeCollectionComposite::get_nc_index( const size_t node_id ) const
}
}

// If node_id is not in the NodeCollection, lower may pass upper in the loop above
// See test_regression_issue-3213.py for an example case.
assert( lower >= upper );

if ( lower > upper or node_id < parts_[ lower ][ 0 ] or parts_[ lower ][ parts_[ lower ].size() - 1 ] < node_id )
Expand Down

0 comments on commit 6e35ed1

Please sign in to comment.