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>2012-01-11 16:33:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 16:33:51 +0400
commite10fd04db0bdcdbc326fce6cddc8af1179a5de5c (patch)
treea8f3a08b35101e30a0e5d4d1a94e0b2ef50c7122 /source/blender/editors/space_file
parentdcef7346eb3f16c27b3f952b6452396e66f5e996 (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_file')
-rw-r--r--source/blender/editors/space_file/file_draw.c2
-rw-r--r--source/blender/editors/space_file/filelist.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 7517c0cd543..c84a9d10ab4 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -134,7 +134,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
ARegion* artmp;
/* Initialize UI block. */
- sprintf(uiblockstr, "win %p", (void *)ar);
+ BLI_snprintf(uiblockstr, sizeof(uiblockstr), "win %p", (void *)ar);
block = uiBeginBlock(C, ar, uiblockstr, UI_EMBOSS);
uiBlockSetHandleFunc(block, do_file_buttons, NULL);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 5b505004f49..32fe8498eaf 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1199,10 +1199,10 @@ void filelist_from_main(struct FileList *filelist)
if(idcode == ID_MA || idcode == ID_TE || idcode == ID_LA || idcode == ID_WO || idcode == ID_IM) {
files->flags |= IMAGEFILE;
}
- if(id->lib && fake) sprintf(files->extra, "LF %d", id->us);
- else if(id->lib) sprintf(files->extra, "L %d", id->us);
- else if(fake) sprintf(files->extra, "F %d", id->us);
- else sprintf(files->extra, " %d", id->us);
+ if(id->lib && fake) BLI_snprintf(files->extra, sizeof(files->extra), "LF %d", id->us);
+ else if(id->lib) BLI_snprintf(files->extra, sizeof(files->extra), "L %d", id->us);
+ else if(fake) BLI_snprintf(files->extra, sizeof(files->extra), "F %d", id->us);
+ else BLI_snprintf(files->extra, sizeof(files->extra), " %d", id->us);
if(id->lib) {
if(totlib==0) firstlib= files;