diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2008-02-10 05:12:06 +0300 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2008-02-10 05:12:06 +0300 |
commit | 34ddfb03c1f2f77d09d02793e368cca5abf95e9c (patch) | |
tree | 8497de7eb1cbf3d39109abf96d13bfebe355133c /source/blender/python/BPY_menus.c | |
parent | c691979370d724ff3439e800a7cbd0aadd60c393 (diff) |
== BPy: scripts in menus ==
Fixing compile warning (about a var that was always true being used as condition in an "if" block).
Diffstat (limited to 'source/blender/python/BPY_menus.c')
-rw-r--r-- | source/blender/python/BPY_menus.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/BPY_menus.c b/source/blender/python/BPY_menus.c index 5f16aa0241b..ebbe301f453 100644 --- a/source/blender/python/BPY_menus.c +++ b/source/blender/python/BPY_menus.c @@ -457,6 +457,7 @@ static int bpymenu_CreateFromFile( void ) { FILE *fp; char line[255], w1[255], w2[255], tooltip[255], *tip; + char upythondir[FILE_MAXDIR]; char *homedir = NULL; int parsing, version, is_userdir; short group; @@ -492,15 +493,14 @@ static int bpymenu_CreateFromFile( void ) * current one. If so, return to force updating from dirs */ w1[0] = '\0'; fscanf( fp, "# User defined scripts dir: %[^\n]\n", w1 ); - if( w1 ) { - char upythondir[FILE_MAXDIR]; - BLI_strncpy(upythondir, U.pythondir, FILE_MAXDIR); - BLI_convertstringcode(upythondir, G.sce, 0); - if( strcmp( w1, upythondir ) != 0 ) - return -1; - w1[0] = '\0'; - } + BLI_strncpy(upythondir, U.pythondir, FILE_MAXDIR); + BLI_convertstringcode(upythondir, G.sce, 0); + + if( strcmp( w1, upythondir ) != 0 ) + return -1; + + w1[0] = '\0'; while( fgets( line, 255, fp ) ) { /* parsing file lines */ |