From 30248214c7fd52333d1c71bebe5ede40dbd76011 Mon Sep 17 00:00:00 2001 From: Philippe L Date: Sat, 3 Jan 2015 15:45:06 +0100 Subject: [PATCH] temp runaway: proper cast to prevent any overflow. --- Marlin/temperature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 94d257d55..7acc5ffd8 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -1049,7 +1049,7 @@ void thermal_runaway_protection(int *state, unsigned long *timer, float temperat { *timer = millis(); } - else if ( (millis() - *timer) > period_seconds*1000) + else if ( (millis() - *timer) > ((unsigned long) period_seconds) * 1000) { SERIAL_ERROR_START; SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: ");