From a2ff775c084c9145a6e09c24daf307d4c96bc3a5 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 26 Apr 2016 11:19:56 +0200 Subject: [PATCH] Limit the max_value for extruders to the number of extruders CuraEngine would crash if instructed to use an extruder that it knows nothing about. Extruders start counting at 0, so max_value is set to machine_extruder_count - 1. Fixes the crash outlined in CURA-965 --- resources/machines/dual_extrusion_printer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json index bdf8f9d34d..2977345bcb 100644 --- a/resources/machines/dual_extrusion_printer.json +++ b/resources/machines/dual_extrusion_printer.json @@ -79,7 +79,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "always_visible": true }, "adhesion_extruder_nr": { @@ -88,7 +88,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true }, "support_extruder_nr": { @@ -97,7 +97,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true, "children": { "support_infill_extruder_nr": { @@ -106,7 +106,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true }, "support_extruder_nr_layer_0": { @@ -115,7 +115,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "global_only": true }, "support_roof_extruder_nr": { @@ -124,7 +124,7 @@ "type": "int", "default": 0, "min_value": "0", - "max_value": "16", + "max_value": "machine_extruder_count - 1", "enabled": "support_roof_enable", "global_only": true }