Merge pull request #334 from mikesinouye/multilib

Increase buffer size in filename append utility to support more liberty files.
This commit is contained in:
alanminko 2024-09-22 20:48:15 -07:00 committed by GitHub
commit 9539306436
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -18,6 +18,13 @@
***********************************************************************/
#ifdef WIN32
#include <windows.h>
#define PATH_MAX MAX_PATH
#else
#include <limits.h>
#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;