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;
* 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));
}
}
}
/* 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);
}
}
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) {