diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-14 15:29:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-14 15:29:15 +0400 |
commit | 63d3594975cde6fd80e503fd433dab6ac3f6223a (patch) | |
tree | c0837273cbbcd807cd228029ac018b8f1746a448 /source/blender | |
parent | ffc8ecc5874931e7a0040141a7bc3ad1b70b17d0 (diff) |
ui_def_but() allocating an extra byte in 'but->str' for no reason.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 20233a67775..4f0d788d733 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2746,8 +2746,8 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, but->retval = retval; slen = strlen(str); - if (slen >= UI_MAX_NAME_STR - 1) { - but->str = MEM_mallocN(slen + 2, "ui_def_but str"); /* why +2 ? */ + if (slen >= UI_MAX_NAME_STR) { + but->str = MEM_mallocN(slen + 1, "ui_def_but str"); } else { but->str = but->strdata; |