Update rcore.c

This commit is contained in:
oblerion 2024-02-01 14:58:49 +01:00 committed by GitHub
parent 5681c3f856
commit 61453b131e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1948,8 +1948,8 @@ const char *GetFileNameWithoutExt(const char *filePath)
{
if (filePath != NULL)
{
const char *fileName = GetFileName(filePath);
int pos = (int)strlen(fileName);
const char *fileName = GetFileName(filePath); // get filename without path
int pos = (int)strlen(fileName); // get filename lenght
for (int i = pos; i>0; i--)
{
if (fileName[i] == '.')
@ -1960,7 +1960,7 @@ const char *GetFileNameWithoutExt(const char *filePath)
}
return TextSubtext(fileName,0,pos);
}
return "";
return "\0";
}
// Get directory for a given filePath