[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35280] trunk/blender/source/blender/ blenlib/intern/path_util.c: Fix [#26207] Render. exe mangles paths in mysterious and awesome ways

Nathan Letwory nathan at letworyinteractive.com
Tue Mar 1 13:52:00 CET 2011


Revision: 35280
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35280
Author:   jesterking
Date:     2011-03-01 12:52:00 +0000 (Tue, 01 Mar 2011)
Log Message:
-----------
Fix [#26207] Render.exe mangles paths in mysterious and awesome ways
Reported by Edwin Amsler

The function for extrapolating the template name with the frame number didn't properly NULL-terminate the
resulting string, this causing broken names and weird paths (if you were lucky - totally unusuable names
detected while stepping through the code).

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/path_util.c

Modified: trunk/blender/source/blender/blenlib/intern/path_util.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/path_util.c	2011-03-01 12:25:55 UTC (rev 35279)
+++ trunk/blender/source/blender/blenlib/intern/path_util.c	2011-03-01 12:52:00 UTC (rev 35280)
@@ -609,6 +609,7 @@
 		p= tmp + ch_sta;
 		p += sprintf(p, format, frame);
 		memcpy(p, path + ch_end, strlen(path + ch_end));
+		*(tmp+strlen(path)) = '\0';
 #endif
 		strcpy(path, tmp);
 		return 1;




More information about the Bf-blender-cvs mailing list