Browse Source

Corrected bug on no-extension

pull/990/head
Ray 5 years ago
parent
commit
c1d282d9e8
1 changed files with 10 additions and 7 deletions
  1. +10
    -7
      src/core.c

+ 10
- 7
src/core.c View File

@ -1798,15 +1798,18 @@ bool IsFileExtension(const char *fileName, const char *ext)
bool result = false;
const char *fileExt = GetExtension(fileName);
int extCount = 0;
const char **checkExts = TextSplit(ext, ';', &extCount);
for (int i = 0; i < extCount; i++)
if (fileExt != NULL)
{
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;
break;
if (strcmp(fileExt, checkExts[i] + 1) == 0)
{
result = true;
break;
}
}
}

Loading…
Cancel
Save