fix for uninitialized value in BLI_path_cwd() if PWD wasn't defined and the CWD was longer then 160.

This commit is contained in:
2011-02-12 10:37:37 +00:00
parent 9e9e028f05
commit 6e47ffcc0d
9 changed files with 31 additions and 28 deletions

View File

@@ -614,7 +614,7 @@ static void init_iconfile_list(struct ListBase *list)
/* since BLI_getdir changes the current working directory, restore it
back to old value afterwards */
if(!BLI_getwdN(olddir))
if(!BLI_getwdN(olddir, sizeof(olddir)))
restoredir = 0;
totfile = BLI_getdir(icondirstr, &dir);
if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */