Browse Source

Fix compiler warning in M145

pull/1/head
Scott Lahteine 8 years ago
parent
commit
396434a445
  1. 4
      Marlin/Marlin_main.cpp

4
Marlin/Marlin_main.cpp

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

Loading…
Cancel
Save