Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerill <merill@free.fr>2020-12-08 04:45:45 +0300
committerGitHub <noreply@github.com>2020-12-08 04:45:45 +0300
commitb8952e68b4009518e6e4d8a93ce7c72e85dd601e (patch)
treea298eb8b45fb81d6ec5bcf2589fed1991d24a489
parent3e22b39a42c911e18ac44e41c723b8699ed8fb87 (diff)
Fix proposal for crash on rectilinearpatch-5
`segs[i_vline + 1]` will crash if `i_vline = segs.size() -1` So you have to test with `if (i_vline < segs.size() - 1)`, right? I didn't understand the rectilinear code that much, so do the right thing if this is not the right way to fix it.
-rw-r--r--src/libslic3r/Fill/FillRectilinear.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libslic3r/Fill/FillRectilinear.cpp b/src/libslic3r/Fill/FillRectilinear.cpp
index e3860af46..fc1556f20 100644
--- a/src/libslic3r/Fill/FillRectilinear.cpp
+++ b/src/libslic3r/Fill/FillRectilinear.cpp
@@ -1237,7 +1237,7 @@ static void pinch_contours_insert_phony_outer_intersections(std::vector<Segmente
for (SegmentIntersection &ip : segs[i_vline - 1].intersections)
if (ip.has_right_horizontal())
ip.next_on_contour = map[ip.next_on_contour];
- if (i_vline < segs.size()) {
+ if (i_vline < segs.size() - 1) {
// Reindex references on next intersection line.
for (SegmentIntersection &ip : segs[i_vline + 1].intersections)
if (ip.has_left_horizontal())