mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-19 01:38:14 +00:00
Corrected bug on no-extension
This commit is contained in:
17
src/core.c
17
src/core.c
@@ -1798,15 +1798,18 @@ bool IsFileExtension(const char *fileName, const char *ext)
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
const char *fileExt = GetExtension(fileName);
|
const char *fileExt = GetExtension(fileName);
|
||||||
|
|
||||||
int extCount = 0;
|
if (fileExt != NULL)
|
||||||
const char **checkExts = TextSplit(ext, ';', &extCount);
|
|
||||||
|
|
||||||
for (int i = 0; i < extCount; i++)
|
|
||||||
{
|
{
|
||||||
if (strcmp(fileExt, checkExts[i] + 1) == 0)
|
int extCount = 0;
|
||||||
|
const char **checkExts = TextSplit(ext, ';', &extCount);
|
||||||
|
|
||||||
|
for (int i = 0; i < extCount; i++)
|
||||||
{
|
{
|
||||||
result = true;
|
if (strcmp(fileExt, checkExts[i] + 1) == 0)
|
||||||
break;
|
{
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user