replace fixed sizes with sizeof when passing string length since size wasn't always correct.

This commit is contained in:
2012-01-12 13:16:30 +00:00
parent 83a161985f
commit 9f2443293e
13 changed files with 35 additions and 24 deletions

View File

@@ -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
}
}