fix for incorrect use of strlen() with the sequencer rna (no need for strlen()+1)

This commit is contained in:
Campbell Barton 2011-09-28 06:48:17 +00:00
parent ba58bc51fd
commit bc593cac23

@ -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)