Skip to content

Commit

Permalink
minor bugfix to unroll cppimpl. Missing cast from vector value to Ele…
Browse files Browse the repository at this point in the history
…mT, which for bool would be a vector value of unsigned char. This was triggering a CSP_ASSERT in debug builds

Signed-off-by: Rob Ambalu <[email protected]>
  • Loading branch information
robambalu authored and Carreau committed May 13, 2024
1 parent 2abdf59 commit da9a84f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/csp/cppnodes/baselibimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,11 @@ DECLARE_CPPNODE( unroll )
{
size_t idx = 0;
if( !s_pending )
CSP_OUTPUT( v[idx++] );
CSP_OUTPUT( static_cast<ElemT>( v[idx++] ) );

s_pending += sz - idx;
for( ; idx < sz; ++idx )
csp.schedule_alarm( alarm, TimeDelta::ZERO(), v[idx] );
csp.schedule_alarm( alarm, TimeDelta::ZERO(), static_cast<ElemT>( v[idx] ) );
}
}

Expand Down

0 comments on commit da9a84f

Please sign in to comment.