Fix compiler warning in M145

This commit is contained in:
Scott Lahteine 2016-10-27 05:53:44 -05:00
parent 8e787304c9
commit 396434a445

View File

@ -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);
}