Skip to content

Commit

Permalink
Fix list traversal with removed head (#9243)
Browse files Browse the repository at this point in the history
Fixes #9241
  • Loading branch information
phannebohm committed Jul 18, 2022
1 parent 2c88f03 commit 9c75b68
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -121,7 +121,8 @@ void cleanValueListbyTime(VALUES_LIST *valueList, double time)
VALUE* elem;

printValuesListTimes(valueList);
for(it = listFirstNode(valueList->valueList); it; it = listNextNode(it))
// need to get first node at each iteration since head is removed
for(it = listFirstNode(valueList->valueList); it; it = listFirstNode(valueList->valueList))
{
elem = (VALUE*)listNodeData(it);
if (elem->time <= time)
Expand Down

0 comments on commit 9c75b68

Please sign in to comment.