Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-05-02 22:16:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-02 22:17:55 +0400
commit0bb20259dbcc6bdd6b2e55a0ddc83eb7999020ee (patch)
tree29080faa07ac2119061337afe63427d24df955fb /source/blender/editors/interface/interface_panel.c
parentb62c2a913bb41f858371594dfab0448bddb773d0 (diff)
Fix incorrect sizes used copying panel idname, tabname.
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 49d44c92eed..2ccb3740777 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -209,8 +209,8 @@ Panel *uiPanelFindByType(ARegion *ar, PanelType *pt)
const char *tabname = pt->idname;
for (pa = ar->panels.first; pa; pa = pa->next) {
- if (STREQLEN(pa->panelname, idname, UI_MAX_NAME_STR)) {
- if (STREQLEN(pa->tabname, tabname, UI_MAX_NAME_STR)) {
+ if (STREQLEN(pa->panelname, idname, sizeof(pa->panelname))) {
+ if (STREQLEN(pa->tabname, tabname, sizeof(pa->panelname))) {
return pa;
}
}
@@ -239,8 +239,8 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, Pan
/* new panel */
pa = MEM_callocN(sizeof(Panel), "new panel");
pa->type = pt;
- BLI_strncpy(pa->panelname, idname, UI_MAX_NAME_STR);
- BLI_strncpy(pa->tabname, tabname, UI_MAX_NAME_STR);
+ BLI_strncpy(pa->panelname, idname, sizeof(pa->panelname));
+ BLI_strncpy(pa->tabname, tabname, sizeof(pa->tabname));
if (pt->flag & PNL_DEFAULT_CLOSED) {
if (align == BUT_VERTICAL)
@@ -261,8 +261,8 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, Pan
if (hookname) {
for (patab = ar->panels.first; patab; patab = patab->next) {
if ((patab->runtime_flag & PNL_ACTIVE) && patab->paneltab == NULL) {
- if (strncmp(hookname, patab->panelname, UI_MAX_NAME_STR) == 0) {
- if (strncmp(tabname, patab->tabname, UI_MAX_NAME_STR) == 0) {
+ if (STREQLEN(hookname, patab->panelname, sizeof(patab->panelname))) {
+ if (STREQLEN(tabname, patab->tabname, sizeof(patab->tabname))) {
pa->paneltab = patab;
ui_panel_copy_offset(pa, patab);
break;