diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6163fa015a8..f1f055b4004 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -516,7 +516,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat BLI_addtail(mainlist, m); lib= alloc_libblock(&m->library, ID_LI, "lib"); - strncpy(lib->name, filepath, sizeof(lib->name)-1); + BLI_strncpy(lib->name, filepath, sizeof(lib->name)); BLI_strncpy(lib->filepath, name1, sizeof(lib->filepath)); m->curlib= lib; @@ -5614,7 +5614,7 @@ static void fix_relpaths_library(const char *basepath, Main *main) * link into an unsaved blend file. See [#27405]. * The remap relative option will make it relative again on save - campbell */ if (strncmp(lib->name, "//", 2)==0) { - strncpy(lib->name, lib->filepath, sizeof(lib->name)); + BLI_strncpy(lib->name, lib->filepath, sizeof(lib->name)); } } } @@ -5623,7 +5623,7 @@ static void fix_relpaths_library(const char *basepath, Main *main) /* Libraries store both relative and abs paths, recreate relative paths, * relative to the blend file since indirectly linked libs will be relative to their direct linked library */ if (strncmp(lib->name, "//", 2)==0) { /* if this is relative to begin with? */ - strncpy(lib->name, lib->filepath, sizeof(lib->name)); + BLI_strncpy(lib->name, lib->filepath, sizeof(lib->name)); BLI_path_rel(lib->name, basepath); } } @@ -12240,7 +12240,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath) bfd->main->versionfile= fd->fileversion; bfd->type= BLENFILETYPE_BLEND; - strncpy(bfd->main->name, filepath, sizeof(bfd->main->name)-1); + BLI_strncpy(bfd->main->name, filepath, sizeof(bfd->main->name)); while(bhead) { switch(bhead->code) { |