diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-12 17:16:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-12 17:16:30 +0400 |
commit | 9f2443293e81b206b782ea320e28c9255f471b42 (patch) | |
tree | 8701a9805332f3e6eed3fd87b7400ae75bd5d973 /source/blender/editors/space_view3d | |
parent | 83a161985fb7b08358190ac50078515e5c65b0c8 (diff) |
replace fixed sizes with sizeof when passing string length since size wasn't always correct.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 3353030e29f..985d70d2144 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -188,7 +188,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float dg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr); if(dg) { max+= BLI_snprintf(str, sizeof(str), "%s %%x%d|", dg->name, dvert->dw[i].def_nr); - if(max<320) strcat(defstr, str); + if (max < sizeof(str)) strcat(defstr, str); } if(tfp->curdef==dvert->dw[i].def_nr) { diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 49b1b3f723e..0705d066f26 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -177,7 +177,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) /* fake button, it holds space for search items */ uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); - but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, OP_MAX_TYPENAME, 10, 0, 150, 19, 0, 0, ""); + but= uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 0, 150, 19, 0, 0, ""); uiButSetSearchFunc(but, operator_search_cb, arg_listbase, operator_call_cb, NULL); uiBoundsBlock(block, 6); |