mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +00:00
stack corruption fix - courtesy of aliaspider
This commit is contained in:
parent
2199e22e63
commit
f6e9745dfe
@ -130,7 +130,7 @@ typedef struct menu_input
|
||||
{
|
||||
const char **buffer;
|
||||
const char *label;
|
||||
const char *label_setting;
|
||||
char label_setting[256];
|
||||
bool display;
|
||||
unsigned type;
|
||||
unsigned idx;
|
||||
@ -303,11 +303,12 @@ bool menu_input_ctl(enum menu_input_ctl_state state, void *data)
|
||||
case MENU_INPUT_CTL_SET_KEYBOARD_LABEL_SETTING:
|
||||
{
|
||||
char **ptr = (char**)data;
|
||||
menu_input->keyboard.label_setting = *ptr;
|
||||
strlcpy(menu_input->keyboard.label_setting,
|
||||
*ptr, sizeof(menu_input->keyboard.label_setting));
|
||||
}
|
||||
return true;
|
||||
case MENU_INPUT_CTL_UNSET_KEYBOARD_LABEL_SETTING:
|
||||
menu_input->keyboard.label_setting = NULL;
|
||||
menu_input->keyboard.label_setting[0] = '\0';
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user