Skip to content

Commit 09c7305

Browse files
committed
Fix compiler warning in M145
1 parent 43bd3f0 commit 09c7305

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
@@ -5524,8 +5524,8 @@ inline void gcode_M140() {
55245524
* F<fan speed>
55255525
*/
55265526
inline void gcode_M145() {
5527-
int8_t material = code_seen('S') ? (int8_t)code_value_int() : 0;
5528-
if (material < 0 || material >= COUNT(lcd_preheat_hotend_temp)) {
5527+
uint8_t material = code_seen('S') ? (uint8_t)code_value_int() : 0;
5528+
if (material >= COUNT(lcd_preheat_hotend_temp)) {
55295529
SERIAL_ERROR_START;
55305530
SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
55315531
}

0 commit comments

Comments
 (0)