Quellcode durchsuchen

temp runaway: proper cast to prevent any overflow.

Philippe L vor 9 Jahren
Ursprung
Commit
30248214c7
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      Marlin/temperature.cpp

+ 1
- 1
Marlin/temperature.cpp Datei anzeigen

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

Laden…
Abbrechen
Speichern