From 1f76745c9da2d54f41943330733c4da3d1d3fd4e Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Thu, 11 Nov 2010 09:52:01 +1100 Subject: [PATCH] slightly stricter sanity check for associated heater index --- temp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/temp.c b/temp.c index 8023b8f..22ca721 100644 --- a/temp.c +++ b/temp.c @@ -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); } }