Skip to content

Commit 396434a

Browse files
committed
Fix compiler warning in M145
1 parent 8e78730 commit 396434a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Marlin/Marlin_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5518,8 +5518,8 @@ inline void gcode_M140() {
55185518
* F<fan speed>
55195519
*/
55205520
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)) {
55235523
SERIAL_ERROR_START;
55245524
SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
55255525
}

0 commit comments

Comments
 (0)