@@ -1840,7 +1840,7 @@ bool FileExists(const char *fileName)
1840
1840
// NOTE: Extensions checking is not case-sensitive
1841
1841
bool IsFileExtension (const char * fileName , const char * ext )
1842
1842
{
1843
- #define MAX_FILE_EXTENSION_SIZE 16
1843
+ #define MAX_FILE_EXTENSION_LENGTH 16
1844
1844
1845
1845
bool result = false;
1846
1846
const char * fileExt = GetFileExtension (fileName );
@@ -1851,8 +1851,8 @@ bool IsFileExtension(const char *fileName, const char *ext)
1851
1851
int extCount = 0 ;
1852
1852
const char * * checkExts = TextSplit (ext , ';' , & extCount ); // WARNING: Module required: rtext
1853
1853
1854
- char fileExtLower [MAX_FILE_EXTENSION_SIZE + 1 ] = { 0 };
1855
- strncpy (fileExtLower , TextToLower (fileExt ), MAX_FILE_EXTENSION_SIZE ); // WARNING: Module required: rtext
1854
+ char fileExtLower [MAX_FILE_EXTENSION_LENGTH + 1 ] = { 0 };
1855
+ strncpy (fileExtLower , TextToLower (fileExt ), MAX_FILE_EXTENSION_LENGTH ); // WARNING: Module required: rtext
1856
1856
1857
1857
for (int i = 0 ; i < extCount ; i ++ )
1858
1858
{
@@ -1946,16 +1946,17 @@ const char *GetFileName(const char *filePath)
1946
1946
// Get filename string without extension (uses static string)
1947
1947
const char * GetFileNameWithoutExt (const char * filePath )
1948
1948
{
1949
- #define MAX_FILENAMEWITHOUTEXT_LENGTH 256
1949
+ #define MAX_FILENAME_LENGTH 256
1950
1950
1951
- static char fileName [MAX_FILENAMEWITHOUTEXT_LENGTH ] = { 0 };
1952
- memset (fileName , 0 , MAX_FILENAMEWITHOUTEXT_LENGTH );
1951
+ static char fileName [MAX_FILENAME_LENGTH ] = { 0 };
1952
+ memset (fileName , 0 , MAX_FILENAME_LENGTH );
1953
1953
1954
1954
if (filePath != NULL )
1955
1955
{
1956
1956
strcpy (fileName , GetFileName (filePath )); // Get filename.ext without path
1957
1957
int size = (int )strlen (fileName ); // Get size in bytes
1958
- for (int i = size ; i > 0 ; i -- ) // Reverse search '.'
1958
+
1959
+ for (int i = size ; i > 0 ; i -- ) // Reverse search '.'
1959
1960
{
1960
1961
if (fileName [i ] == '.' )
1961
1962
{
@@ -1965,6 +1966,7 @@ const char *GetFileNameWithoutExt(const char *filePath)
1965
1966
}
1966
1967
}
1967
1968
}
1969
+
1968
1970
return fileName ;
1969
1971
}
1970
1972
0 commit comments