diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-08 11:33:52 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-08 11:33:52 +0300 |
commit | 65da16a5c1df5c215e17452687eb95ad5fa17de5 (patch) | |
tree | ae7ea833eee0ac4e7a6c25b5cf03f2bcda450cfc /source/blender/blenlib | |
parent | 092c3d8a85dbfb0a5eb41ae2f2ac6a5363cf4c97 (diff) |
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).
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index c0c8fc4e24f..06fb656fa5b 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1392,9 +1392,12 @@ int BLI_replace_extension(char *path, int maxlen, const char *ext) { 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); |