diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-11 16:33:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-11 16:33:51 +0400 |
commit | e10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch) | |
tree | a8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/editors/space_info/info_ops.c | |
parent | dcef7346eb3f16c27b3f952b6452396e66f5e996 (diff) |
use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
Diffstat (limited to 'source/blender/editors/space_info/info_ops.c')
-rw-r--r-- | source/blender/editors/space_info/info_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index deff1c77912..2090b4eae0a 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -143,7 +143,7 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) Main *bmain= CTX_data_main(C); uiPopupMenu *pup; uiLayout *layout; - char title[128]; + char title[64]; int count = 0; count = countPackedFiles(bmain); @@ -155,9 +155,9 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) } if(count == 1) - sprintf(title, "Unpack 1 file"); + strcpy(title, "Unpack 1 file"); else - sprintf(title, "Unpack %d files", count); + BLI_snprintf(title, sizeof(title), "Unpack %d files", count); pup= uiPupMenuBegin(C, title, ICON_NONE); layout= uiPupMenuLayout(pup); |