diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index c258d9aa3b..46c70be640 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -1538,7 +1538,7 @@ void FffGcodeWriter::calculateExtruderOrderPerLayer(const SliceDataStorage& stor extruder_order_per_layer.init(true, storage.print_layer_count); const std::vector extruders_used = storage.getExtrudersUsed(); - for (LayerIndex layer_nr = -Raft::getTotalExtraLayers(); layer_nr < static_cast(storage.print_layer_count); layer_nr++) + for (LayerIndex layer_nr = -static_cast(Raft::getTotalExtraLayers()); layer_nr < static_cast(storage.print_layer_count); layer_nr++) { std::vector extruder_order = getUsedExtrudersOnLayer(storage, last_extruder, layer_nr, extruders_used); extruder_order_per_layer.push_back(extruder_order);