Browse Source

Fix "possible buffer overrun" warning (#17513)

Jason Smith 5 years ago
parent
commit
cba58b1027
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/src/lcd/menu/menu_ubl.cpp

+ 2
- 2
Marlin/src/lcd/menu/menu_ubl.cpp View File

@@ -188,8 +188,8 @@ void _lcd_ubl_edit_mesh() {
188 188
  */
189 189
 void _lcd_ubl_validate_custom_mesh() {
190 190
   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);
193 193
   queue.inject(ubl_lcd_gcode);
194 194
 }
195 195
 

Loading…
Cancel
Save