Update rcore.c
This commit is contained in:
parent
36977d9772
commit
bcc26183fa
|
|
@ -1948,14 +1948,15 @@ const char *GetFileNameWithoutExt(const char *filePath)
|
||||||
{
|
{
|
||||||
if (filePath != NULL)
|
if (filePath != NULL)
|
||||||
{
|
{
|
||||||
const char *fileName = GetFileName(filePath); // Get filename without path
|
const char *fileName = GetFileName(filePath); // Get filename.ext without path
|
||||||
for (int i = (int)strlen(fileName); i>0; i--) // Reverse search
|
for (int i = (int)strlen(fileName); i>0; i--) // Reverse search '.'
|
||||||
{
|
{
|
||||||
if (fileName[i] == '.')
|
if (fileName[i] == '.')
|
||||||
{
|
{
|
||||||
return TextSubtext(fileName,0,i);
|
return TextSubtext(fileName,0,i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return fileName; // Extension not found
|
||||||
}
|
}
|
||||||
return "\0";
|
return "\0";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user