Browse Source

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

Bugfix: iteration invokes undefined behavior
pull/1/head
Scott Lahteine 9 years ago
parent
commit
58339aea5f
  1. 2
      Marlin/temperature.cpp

2
Marlin/temperature.cpp

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

Loading…
Cancel
Save