slightly stricter sanity check for associated heater index

This commit is contained in:
Michael Moon 2010-11-11 09:52:01 +11:00
parent e2063137b5
commit 1f76745c9d
1 changed files with 1 additions and 1 deletions

2
temp.c
View File

@ -228,7 +228,7 @@ void temp_sensor_tick() {
all_within_range = 0;
}
if (temp_sensors[i].heater_index != 255) {
if (temp_sensors[i].heater_index < NUM_HEATERS) {
heater_tick(temp_sensors[i].heater_index, temp_sensors_runtime[i].last_read_temp, temp_sensors_runtime[i].target_temp);
}
}