mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-24 20:18:30 +00:00
Remove trailing spaces
This commit is contained in:
16
src/rcore.c
16
src/rcore.c
@@ -1963,25 +1963,25 @@ bool IsFileExtension(const char *fileName, const char *ext)
|
||||
if ((fileExt[i] >= 'A') && (fileExt[i] <= 'Z')) fileExtLower[i] = fileExt[i] + 32;
|
||||
else fileExtLower[i] = fileExt[i];
|
||||
}
|
||||
|
||||
|
||||
int extCount = 1;
|
||||
int extLen = (int)strlen(ext);
|
||||
char *extList = (char *)RL_CALLOC(extLen + 1, 1);
|
||||
char *extListPtrs[MAX_FILE_EXTENSIONS] = { 0 };
|
||||
strcpy(extList, ext);
|
||||
extListPtrs[0] = extList;
|
||||
|
||||
for (int i = 0; i < extLen; i++)
|
||||
|
||||
for (int i = 0; i < extLen; i++)
|
||||
{
|
||||
// Convert to lower-case if extension is upper-case
|
||||
if ((extList[i] >= 'A') && (extList[i] <= 'Z')) extList[i] += 32;
|
||||
|
||||
|
||||
// Get pointer to next extension and add null-terminator
|
||||
if ((extList[i] == ';') && (extCount < (MAX_FILE_EXTENSIONS - 1)))
|
||||
{
|
||||
extList[i] = '\0';
|
||||
extList[i] = '\0';
|
||||
extListPtrs[extCount] = extList + i + 1;
|
||||
extCount++;
|
||||
extCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1991,7 +1991,7 @@ bool IsFileExtension(const char *fileName, const char *ext)
|
||||
// does not start with the '.'
|
||||
fileExtLowerPtr = fileExtLower;
|
||||
if (extListPtrs[i][0] != '.') fileExtLowerPtr++;
|
||||
|
||||
|
||||
if (strcmp(fileExtLowerPtr, extListPtrs[i]) == 0)
|
||||
{
|
||||
result = true;
|
||||
@@ -2053,7 +2053,7 @@ int GetFileLength(const char *fileName)
|
||||
// WARNING: We just get the ptr but not the extension as a separate string
|
||||
const char *GetFileExtension(const char *fileName)
|
||||
{
|
||||
const char *dot = strrchr(fileName, '.');
|
||||
const char *dot = strrchr(fileName, '.');
|
||||
|
||||
if (!dot || (dot == fileName)) return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user