You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you mentioned in documentation, I think the index should be checked whether it is out of bounds before directly used as polygon.points[index].
turtle-master/src/renderer_server/renderer/display_list.rs
/// Panics if the given handle does not refer to a polygon primitive or if the given index is/// out of bounds.pubfnpolygon_update(&mutself,handle:PrimHandle,index:usize,point:Point){let prim = self.items.get_mut(&handle).expect("bug: invalid handle");let polygon = prim.as_polygon_mut().expect("bug: attempt to update a point in a draw primitive that was not a polygon");// This will panic if the index is out of bounds
polygon.points[index] = point;}
The text was updated successfully, but these errors were encountered:
As you mentioned in documentation, I think the index should be checked whether it is out of bounds before directly used as polygon.points[index].
turtle-master/src/renderer_server/renderer/display_list.rs
The text was updated successfully, but these errors were encountered: