[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40643] trunk/blender/source/blender/ makesrna/intern/rna_sequencer.c: fix for incorrect use of strlen() with the sequencer rna (no need for strlen()+1)

Campbell Barton ideasman42 at gmail.com
Wed Sep 28 08:48:18 CEST 2011


Revision: 40643
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40643
Author:   campbellbarton
Date:     2011-09-28 06:48:17 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
fix for incorrect use of strlen() with the sequencer rna (no need for strlen()+1)

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_sequencer.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2011-09-28 06:26:46 UTC (rev 40642)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2011-09-28 06:48:17 UTC (rev 40643)
@@ -463,10 +463,8 @@
 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 @@
 	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_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 @@
 	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)




More information about the Bf-blender-cvs mailing list