Skip to content

[InterventionalRadiologyController] fix when giving 0 as index for fixFirstNodesWithUntil#219

Open
fredroy wants to merge 1 commit intosofa-framework:masterfrom
fredroy:irc_fix_fixbeams
Open

[InterventionalRadiologyController] fix when giving 0 as index for fixFirstNodesWithUntil#219
fredroy wants to merge 1 commit intosofa-framework:masterfrom
fredroy:irc_fix_fixbeams

Conversation

@fredroy
Copy link
Contributor

@fredroy fredroy commented Mar 19, 2026

prevents the unsigned underflow of for(unsigned int i=0; i<firstSimulatedNode-1 ; i++)
(not sure if the case arises but still)

if giving, then just dont constraint anything

@fredroy fredroy added pr: fix pr: status to review To notify reviewers to review this pull-request labels Mar 19, 2026
Comment on lines +1126 to +1130
if (firstSimulatedNode == 0)
{
d_indexFirstNode = 0;
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (firstSimulatedNode == 0)
{
d_indexFirstNode = 0;
return;
}
if (firstSimulatedNode == 0)
{
msg_warning() << "An invalid value of firstSimulatedNode equal to 0 has been given to fixFirstNodesWithUntil() method.";
d_indexFirstNode = 0;
return;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants