Skip to content

Commit f0887a8

Browse files
committed
Fix indexing defect
1 parent 69f54b7 commit f0887a8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dynadjust/include/functions/dnatemplatestnmsrfuncs.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,12 @@ void CopyClusterMsr(T& cluster, const msriterator _it_msr, T& clusterCopy)
381381

382382
while (_it_msr_last != cluster.end())
383383
{
384-
if ((++_it_msr_temp)->measType != 'Y')
384+
if ((++_it_msr_temp) == cluster.end())
385+
{
386+
++_it_msr_last;
387+
break;
388+
}
389+
if (_it_msr_temp->measType != 'Y')
385390
{
386391
++_it_msr_last;
387392
break;

0 commit comments

Comments
 (0)