From cba58b1027b8192d71cc0505a8667d0b1b303218 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Mon, 20 Apr 2020 05:16:38 -0700 Subject: [PATCH] Fix "possible buffer overrun" warning (#17513) --- Marlin/src/lcd/menu/menu_ubl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index 4d7edbdfd..a4db6da37 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -188,8 +188,8 @@ void _lcd_ubl_edit_mesh() { */ void _lcd_ubl_validate_custom_mesh() { char ubl_lcd_gcode[24]; - const int temp = TERN(HAS_HEATED_BED, custom_bed_temp, 0); - sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26 C B%i H%i P"), temp, custom_hotend_temp); + const int16_t temp = TERN(HAS_HEATED_BED, custom_bed_temp, 0); + sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26 C B%" PRIi16 " H%" PRIi16 " P"), temp, custom_hotend_temp); queue.inject(ubl_lcd_gcode); }