Update rcore.c
This commit is contained in:
parent
61453b131e
commit
1c80aa32e2
|
|
@ -1948,17 +1948,14 @@ 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 without path
|
||||||
int pos = (int)strlen(fileName); // get filename lenght
|
for (int i = (int)strlen(fileName); i>0; i--) // reverse search
|
||||||
for (int i = pos; i>0; i--)
|
|
||||||
{
|
{
|
||||||
if (fileName[i] == '.')
|
if (fileName[i] == '.')
|
||||||
{
|
{
|
||||||
pos = i;
|
return TextSubtext(fileName,0,i);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TextSubtext(fileName,0,pos);
|
|
||||||
}
|
}
|
||||||
return "\0";
|
return "\0";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user