From bc593cac2354c863f074d9d51cffb3dca9f499a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Sep 2011 06:48:17 +0000 Subject: fix for incorrect use of strlen() with the sequencer rna (no need for strlen()+1) --- source/blender/makesrna/intern/rna_sequencer.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 96e6eea22af..d7e0113f56e 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -463,10 +463,8 @@ static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value) static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value) { Sequence *seq= (Sequence*)(ptr->data); - char path[FILE_MAX]; - BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name); - BLI_strncpy(value, path, strlen(path)+1); + BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name); } static int rna_Sequence_filepath_length(PointerRNA *ptr) @@ -475,7 +473,7 @@ static int rna_Sequence_filepath_length(PointerRNA *ptr) char path[FILE_MAX]; BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name); - return strlen(path)+1; + return strlen(path); } static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value) @@ -491,10 +489,8 @@ static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value) static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value) { StripProxy *proxy= (StripProxy*)(ptr->data); - char path[FILE_MAX]; - BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file); - BLI_strncpy(value, path, strlen(path)+1); + BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file); } static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr) @@ -503,7 +499,7 @@ static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr) char path[FILE_MAX]; BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file); - return strlen(path)+1; + return strlen(path); } static void rna_Sequence_volume_set(PointerRNA *ptr, float value) -- cgit v1.2.3