Browse Source

Fix compiler warning in M145

Scott Lahteine 7 years ago
parent
commit
396434a445
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/Marlin_main.cpp

+ 2
- 2
Marlin/Marlin_main.cpp View File

@@ -5518,8 +5518,8 @@ inline void gcode_M140() {
5518 5518
    *   F<fan speed>
5519 5519
    */
5520 5520
   inline void gcode_M145() {
5521
-    int8_t material = code_seen('S') ? (int8_t)code_value_int() : 0;
5522
-    if (material < 0 || material >= COUNT(lcd_preheat_hotend_temp)) {
5521
+    uint8_t material = code_seen('S') ? (uint8_t)code_value_int() : 0;
5522
+    if (material >= COUNT(lcd_preheat_hotend_temp)) {
5523 5523
       SERIAL_ERROR_START;
5524 5524
       SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
5525 5525
     }

Loading…
Cancel
Save