Browse Source

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

Bugfix: iteration invokes undefined behavior
Scott Lahteine 8 years ago
parent
commit
58339aea5f
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/temperature.cpp

+ 1
- 1
Marlin/temperature.cpp View File

@@ -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…
Cancel
Save