temp runaway: proper cast to prevent any overflow.

This commit is contained in:
Philippe L 2015-01-03 15:45:06 +01:00
parent 975810fb4a
commit 30248214c7

View file

@ -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: ");