diff --git a/src/misc/extra/extraUtilFile.c b/src/misc/extra/extraUtilFile.c index 54e6efc259..6585b7a729 100644 --- a/src/misc/extra/extraUtilFile.c +++ b/src/misc/extra/extraUtilFile.c @@ -18,6 +18,13 @@ ***********************************************************************/ +#ifdef WIN32 +#include +#define PATH_MAX MAX_PATH +#else +#include +#endif + #include "extra.h" ABC_NAMESPACE_IMPL_START @@ -184,9 +191,9 @@ char * Extra_FileNameGeneric( char * FileName ) ***********************************************************************/ char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix ) { - static char Buffer[1000]; + static char Buffer[PATH_MAX]; char * pDot; - assert( strlen(pBase) + strlen(pSuffix) < 1000 ); + assert( strlen(pBase) + strlen(pSuffix) < PATH_MAX ); strcpy( Buffer, pBase ); if ( (pDot = strrchr( Buffer, '.' )) ) *pDot = 0;