Skip to content

Commit 0b5bcbc

Browse files
sjasonsmithHairingX
authored andcommitted
Fix "possible buffer overrun" warning (MarlinFirmware#17513)
1 parent 47da752 commit 0b5bcbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Marlin/src/lcd/menu/menu_ubl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ void _lcd_ubl_edit_mesh() {
188188
*/
189189
void _lcd_ubl_validate_custom_mesh() {
190190
char ubl_lcd_gcode[24];
191-
const int temp = TERN(HAS_HEATED_BED, custom_bed_temp, 0);
192-
sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26 C B%i H%i P"), temp, custom_hotend_temp);
191+
const int16_t temp = TERN(HAS_HEATED_BED, custom_bed_temp, 0);
192+
sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26 C B%" PRIi16 " H%" PRIi16 " P"), temp, custom_hotend_temp);
193193
queue.inject(ubl_lcd_gcode);
194194
}
195195

0 commit comments

Comments
 (0)