Browse Source

temp runaway: proper cast to prevent any overflow.

Philippe L 9 years ago
parent
commit
30248214c7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/temperature.cpp

+ 1
- 1
Marlin/temperature.cpp View File

@@ -1049,7 +1049,7 @@ void thermal_runaway_protection(int *state, unsigned long *timer, float temperat
1049 1049
       {
1050 1050
         *timer = millis();
1051 1051
       } 
1052
-      else if ( (millis() - *timer) > period_seconds*1000)
1052
+      else if ( (millis() - *timer) > ((unsigned long) period_seconds) * 1000)
1053 1053
       {
1054 1054
         SERIAL_ERROR_START;
1055 1055
         SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: ");

Loading…
Cancel
Save