Fix pmdata.num_verts assignment in Import3DS - #48
Conversation
Set pmdata[pmodel_id].num_verts to total_num_verts instead of cnt in Import3DS so that it correctly reflects the 3D vertex array size in pmdata.w. This prevents out-of-bounds array access in Compute3DSModelNormals and Smooth3DSModelNormals. Co-authored-by: moonwho101 <90150577+moonwho101@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Fixes an issue in src/Import3DS.cpp where pmdata[pmodel_id].num_verts was set to cnt (face corner count) instead of total_num_verts (3D vertex count) after adding degenerate triangle filtering. Setting num_verts to total_num_verts restores the correct vertex count for array bounds checking in Compute3DSModelNormals and Smooth3DSModelNormals.
PR created automatically by Jules for task 12037048536622632796 started by @moonwho101