Explorar el Código

Merge pull request #3769 from jbrazio/bugfix/iteration-invokes-undef-behavior

Bugfix: iteration invokes undefined behavior
Scott Lahteine hace 8 años
padre
commit
58339aea5f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      Marlin/temperature.cpp

+ 1
- 1
Marlin/temperature.cpp Ver fichero

@@ -342,7 +342,7 @@ int Temperature::getHeaterPower(int heater) {
342 342
       EXTRUDER_3_AUTO_FAN_PIN == EXTRUDER_2_AUTO_FAN_PIN ? 2 : 3
343 343
     };
344 344
     uint8_t fanState = 0;
345
-    for (int f = 0; f <= 3; f++) {
345
+    for (int f = 0; f <= EXTRUDERS; f++) {
346 346
       if (current_temperature[f] > EXTRUDER_AUTO_FAN_TEMPERATURE)
347 347
         SBI(fanState, fanBit[f]);
348 348
     }

Loading…
Cancelar
Guardar