From c93314c8fed65c68440d061d7bab49705e203c3c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 14 Mar 2017 01:32:37 +0100 Subject: [PATCH] Bugfix: wrong extruder order when more than 10 extruders were used. #3235 --- lib/Slic3r/Print/GCode.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Print/GCode.pm b/lib/Slic3r/Print/GCode.pm index b2187f208..bd0701437 100644 --- a/lib/Slic3r/Print/GCode.pm +++ b/lib/Slic3r/Print/GCode.pm @@ -582,7 +582,7 @@ sub process_layer { } # tweak extruder ordering to save toolchanges - my @extruders = sort keys %by_extruder; + my @extruders = sort { $a <=> $b } keys %by_extruder; if (@extruders > 1) { my $last_extruder_id = $self->_gcodegen->writer->extruder->id; if (exists $by_extruder{$last_extruder_id}) {