From 86d588d60500135fa27e50df55319e6ae77ac648 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Sun, 22 Jul 2018 08:15:32 -0500 Subject: [PATCH] Use < instead of <=, avoids a infinite loop. --- xs/src/libslic3r/PrintObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 012881224..0b9e8a7db 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -1460,7 +1460,7 @@ PrintObject::_discover_neighbor_horizontal_shells(LayerRegion* layerm, const siz auto* print {this->print()}; const auto& region_config {layerm->region()->config}; - for (int n = (type == stTop ? i-1 : i+1); std::abs(n-int(i)) <= solid_layers-1; (type == stTop ? n-- : n++)) { + for (int n = (type == stTop ? i-1 : i+1); std::abs(n-int(i)) < solid_layers; (type == stTop ? n-- : n++)) { if (n < 0 || n >= this->layer_count()) continue; Slic3r::Log::debug("PrintObject") << " looking for neighbors on layer " << n << "...\n";