Fix sheet rename resetting characters to blank

This commit is contained in:
Alex Voinea 2023-09-30 14:47:35 +02:00
parent 8a39f53e26
commit 3e15a24be7
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
typedef struct
{
char name[MAX_SHEET_NAME_LENGTH]; //!< Can be null terminated, doesn't need to be null terminated
unsigned char name[MAX_SHEET_NAME_LENGTH]; //!< Can be null terminated, doesn't need to be null terminated
int16_t z_offset; //!< Z_BABYSTEP_MIN .. Z_BABYSTEP_MAX = Z_BABYSTEP_MIN*2/1000 [mm] .. Z_BABYSTEP_MAX*2/1000 [mm]
uint8_t bed_temp; //!< 0 .. 254 [°C] NOTE: currently only written-to and never used
uint8_t pinda_temp; //!< 0 .. 254 [°C] NOTE: currently only written-to and never used

View File

@ -5038,7 +5038,7 @@ static void lcd_rename_sheet_menu()
{
bool initialized;
uint8_t selected;
char name[sizeof(Sheet::name)];
unsigned char name[sizeof(Sheet::name)];
};
static_assert(sizeof(menu_data)>= sizeof(MenuData),"MenuData doesn't fit into menu_data");
MenuData* menuData = (MenuData*)&(menu_data[0]);