@@ -3688,12 +3688,12 @@ static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const
3688
3688
(strcmp (dp -> d_name , ".." ) != 0 ))
3689
3689
{
3690
3690
#if defined(_WIN32 )
3691
- int realPathLength = snprintf (path , sizeof ( path ) - 1 , "%s\\%s" , basePath , dp -> d_name );
3691
+ int pathLength = snprintf (path , MAX_FILEPATH_LENGTH - 1 , "%s\\%s" , basePath , dp -> d_name );
3692
3692
#else
3693
- int realPathLength = snprintf (path , sizeof ( path ) - 1 , "%s/%s" , basePath , dp -> d_name );
3693
+ int pathLength = snprintf (path , MAX_FILEPATH_LENGTH - 1 , "%s/%s" , basePath , dp -> d_name );
3694
3694
#endif
3695
3695
3696
- if (realPathLength < 0 || realPathLength >= sizeof ( path ))
3696
+ if (( pathLength < 0 ) || ( pathLength >= MAX_FILEPATH_LENGTH ))
3697
3697
{
3698
3698
TRACELOG (LOG_WARNING , "FILEIO: Path longer than %d characters (%s...)" , MAX_FILEPATH_LENGTH , basePath );
3699
3699
}
@@ -3746,12 +3746,12 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *fi
3746
3746
{
3747
3747
// Construct new path from our base path
3748
3748
#if defined(_WIN32 )
3749
- int realPathLength = snprintf (path , sizeof ( path ) - 1 , "%s\\%s" , basePath , dp -> d_name );
3749
+ int pathLength = snprintf (path , MAX_FILEPATH_LENGTH - 1 , "%s\\%s" , basePath , dp -> d_name );
3750
3750
#else
3751
- int realPathLength = snprintf (path , sizeof ( path ) - 1 , "%s/%s" , basePath , dp -> d_name );
3751
+ int pathLength = snprintf (path , MAX_FILEPATH_LENGTH - 1 , "%s/%s" , basePath , dp -> d_name );
3752
3752
#endif
3753
3753
3754
- if (realPathLength < 0 || realPathLength >= sizeof ( path ))
3754
+ if (( pathLength < 0 ) || ( pathLength >= MAX_FILEPATH_LENGTH ))
3755
3755
{
3756
3756
TRACELOG (LOG_WARNING , "FILEIO: Path longer than %d characters (%s...)" , MAX_FILEPATH_LENGTH , basePath );
3757
3757
}
0 commit comments