Revision: 35401
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35401
Author:   jesterking
Date:     2011-03-08 08:33:52 +0000 (Tue, 08 Mar 2011)
Log Message:
-----------
Apply [#26311] Collada Exporter Crash on Win64 build
Submitted by Filiciss Muhgue

Selecting COLLADA export after starting blender into default scene Blender 
would crash, due to misreading the path string (no file saved yet, so it was 
zero).

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-08 
07:44:30 UTC (rev 35400)
+++ trunk/blender/source/blender/blenlib/intern/path_util.c     2011-03-08 
08:33:52 UTC (rev 35401)
@@ -1392,9 +1392,12 @@
 {
        unsigned int a;
 
-       for(a=strlen(path)-1; a>=0; a--)
-               if(path[a] == '.' || path[a] == '/' || path[a] == '\\')
+       for(a=strlen(path); a>0; a--) {
+               if(path[a-1] == '.' || path[a-1] == '/' || path[a-1] == '\\') {
+                       a--;
                        break;
+               }
+       }
        
        if(path[a] != '.')
                a= strlen(path);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to