diff options
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 86095e6b909..1ef254d355f 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -442,18 +442,18 @@ int BLI_exists(const char *name) /* in Windows stat doesn't recognize dir ending on a slash To not break code where the ending slash is expected we don't mess with the argument name directly here - elubie */ - char tmp[FILE_MAXDIR+FILE_MAXFILE]; + char tmp[FILE_MAX]; int len, res; - BLI_strncpy(tmp, name, FILE_MAXDIR+FILE_MAXFILE); + BLI_strncpy(tmp, name, FILE_MAX); len = strlen(tmp); if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; res = _stat(tmp, &st); if (res == -1) return(0); #elif defined(__MINGW32__) struct _stati64 st; - char tmp[FILE_MAXDIR+FILE_MAXFILE]; + char tmp[FILE_MAX]; int len, res; - BLI_strncpy(tmp, name, FILE_MAXDIR+FILE_MAXFILE); + BLI_strncpy(tmp, name, FILE_MAX); len = strlen(tmp); if (len > 3 && ( tmp[len-1]=='\\' || tmp[len-1]=='/') ) tmp[len-1] = '\0'; res = _stati64(tmp, &st); |