Fix incorrect strncat use
authorCampbell Barton <ideasman42@gmail.com>
Tue, 22 Mar 2016 16:54:04 +0000 (03:54 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 22 Mar 2016 16:54:04 +0000 (03:54 +1100)
source/blender/editors/space_file/file_ops.c

index ddb8b1cee9df092390bab15ef9fd750256a7989c..d83a7d5ea62332b5f1344d86bd09f2c7c656d271 100644 (file)
@@ -1374,8 +1374,8 @@ int file_exec(bContext *C, wmOperator *exec_op)
                        BLI_parent_dir(sfile->params->dir);
                }
                else {
-                       BLI_cleanup_dir(G.main->name, sfile->params->dir);
-                       strncat(sfile->params->dir, file->relpath, sizeof(sfile->params->dir));
+                       BLI_cleanup_path(G.main->name, sfile->params->dir);
+                       BLI_path_append(sfile->params->dir, sizeof(sfile->params->dir) - 1, file->relpath);
                        BLI_add_slash(sfile->params->dir);
                }