Fix 'cmd' array warning (#19193)
This commit is contained in:
parent
ee572856e9
commit
414136f33a
|
@ -138,8 +138,9 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
|
||||||
SUBMENU_N_P(s, msg, []{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, MenuItemBase::itemIndex); });
|
SUBMENU_N_P(s, msg, []{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, MenuItemBase::itemIndex); });
|
||||||
else {
|
else {
|
||||||
ACTION_ITEM_N_P(s, msg, []{
|
ACTION_ITEM_N_P(s, msg, []{
|
||||||
char cmd[13];
|
PGM_P const cmdpstr = PSTR("M600 B0 T%i");
|
||||||
sprintf_P(cmd, PSTR("M600 B0 T%i"), int(MenuItemBase::itemIndex));
|
char cmd[strlen_P(cmdpstr) + 3 + 1];
|
||||||
|
sprintf_P(cmd, cmdpstr, int(MenuItemBase::itemIndex));
|
||||||
queue.inject(cmd);
|
queue.inject(cmd);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue