Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-06-05 17:12:17 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-06-05 17:12:17 +0400
commit6757b759ea29f8b59d92b2772efd2d0d1dac2c8a (patch)
tree9dd84f533df3fd675a2df82ff6c06144dca6c11f /source/blender/blenlib
parentf35289574ac8a6c96fb82652a99509406ac2368e (diff)
added checks for zero length strings when checking for the last character
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/util.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c
index ad34af05ac7..848e45ccb1b 100644
--- a/source/blender/blenlib/intern/util.c
+++ b/source/blender/blenlib/intern/util.c
@@ -1173,10 +1173,12 @@ int BLI_convertstringcode(char *path, const char *basepath)
strcpy(path, tmp);
}
- if (path[strlen(path)-1]=='/') {
- BLI_cleanup_dir(NULL, path);
- } else {
- BLI_cleanup_file(NULL, path);
+ if (path[0]!='\0') {
+ if ( path[strlen(path)-1]=='/') {
+ BLI_cleanup_dir(NULL, path);
+ } else {
+ BLI_cleanup_file(NULL, path);
+ }
}
#ifdef WIN32