replace fixed sizes with sizeof when passing string length since size wasn't always correct.
This commit is contained in:
@@ -831,7 +831,9 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
|
||||
if(but->optype) {
|
||||
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
|
||||
|
||||
if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, buf, sizeof(buf))) {
|
||||
if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE,
|
||||
buf, sizeof(buf)))
|
||||
{
|
||||
UI_MENU_KEY_STR_CAT
|
||||
}
|
||||
}
|
||||
@@ -846,7 +848,9 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block)
|
||||
|
||||
IDP_AssignString(prop_menu_name, mt->idname, sizeof(mt->idname));
|
||||
|
||||
if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE, buf, sizeof(buf))) {
|
||||
if(WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE,
|
||||
buf, sizeof(buf)))
|
||||
{
|
||||
UI_MENU_KEY_STR_CAT
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user