Bugfix: iteration invokes undefined behavior

This commit is contained in:
João Brázio 2016-05-15 22:45:08 +01:00
parent abdfd914f8
commit ecd490ed49
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: F62CFD37DFFDB540

View file

@ -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]);
}