Skip to content

[215_7] fix ellipse array bounds issue (#2944)#2948

Open
physical168 wants to merge 3 commits intoMoganLab:mainfrom
physical168:physical168/215_7/fix_ellipse_bounds
Open

[215_7] fix ellipse array bounds issue (#2944)#2948
physical168 wants to merge 3 commits intoMoganLab:mainfrom
physical168:physical168/215_7/fix_ellipse_bounds

Conversation

@physical168
Copy link

No description provided.

@physical168
Copy link
Author

This PR addresses the crash issue when interacting with ellipses in drawing mode (#2944).

Problem:
ellipse_rep::get_control_points returned 3 control points, but initialized the abs array with only 2 values. This led to out-of-bounds access during graphical selection.

Solution:
Aligned the abs array size to 3 with values 0.0, 0.5, 1.0 to match the control point count.

Details:

  • Modified src/Graphics/Types/curve.cpp
  • Added developer documentation at devel/215_7.md

@JackYansongLi
Copy link
Contributor

Please format your code with Clang@19.

@physical168
Copy link
Author

Thanks for reviewing my code! I've just reformatted the code using Clang and pushed the update. Please check if it complies with the project's style.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants