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>2011-09-28 10:48:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-28 10:48:17 +0400
commitbc593cac2354c863f074d9d51cffb3dca9f499a3 (patch)
tree8e6b98d1999145b3ef4b94bb06db481e87f55008 /source/blender/makesrna
parentba58bc51fda66daf84e8a5dd8b54fd0e9834e6b2 (diff)
fix for incorrect use of strlen() with the sequencer rna (no need for strlen()+1)
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c12
1 files changed, 4 insertions, 8 deletions
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)