mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 19:38:06 -04:00
use M_BaseName() in M_FileCaseExists()
This commit is contained in:
parent
dafff23764
commit
ef1362f613
@ -92,15 +92,8 @@ char *M_FileCaseExists(const char *path)
|
|||||||
return path_dup;
|
return path_dup;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = strrchr(path_dup, DIR_SEPARATOR);
|
// cast result to (char *), because `path_dup` isn't (const char *) in the first place
|
||||||
if (filename != NULL)
|
filename = (char *) M_BaseName(path_dup);
|
||||||
{
|
|
||||||
filename++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
filename = path_dup;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1: lowercase filename, e.g. doom2.wad
|
// 1: lowercase filename, e.g. doom2.wad
|
||||||
M_ForceLowercase(filename);
|
M_ForceLowercase(filename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user