mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 11:22:18 -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;
|
||||
}
|
||||
|
||||
filename = strrchr(path_dup, DIR_SEPARATOR);
|
||||
if (filename != NULL)
|
||||
{
|
||||
filename++;
|
||||
}
|
||||
else
|
||||
{
|
||||
filename = path_dup;
|
||||
}
|
||||
// cast result to (char *), because `path_dup` isn't (const char *) in the first place
|
||||
filename = (char *) M_BaseName(path_dup);
|
||||
|
||||
// 1: lowercase filename, e.g. doom2.wad
|
||||
M_ForceLowercase(filename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user