Browse Source

Merge pull request #1309 from philfifi/fix_temp_runaway

temp runaway: proper cast to prevent any overflow.
alexborro 9 years ago
parent
commit
d2b6e62996
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/temperature.cpp

+ 1
- 1
Marlin/temperature.cpp View File

1049
       {
1049
       {
1050
         *timer = millis();
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
         SERIAL_ERROR_START;
1054
         SERIAL_ERROR_START;
1055
         SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: ");
1055
         SERIAL_ERRORLNPGM("Thermal Runaway, system stopped! Heater_ID: ");

Loading…
Cancel
Save