const char correctness

This commit is contained in:
Fabian Greffrath 2022-03-24 12:00:07 +01:00
parent a29271794a
commit 7c7168186e

View File

@ -189,7 +189,8 @@ boolean M_StrToInt(const char *str, int *result)
char *M_DirName(const char *path)
{
char *pf, *pb, *result;
char *result;
const char *pf, *pb;
pf = strrchr(path, '/');
#ifdef _WIN32
@ -203,7 +204,7 @@ char *M_DirName(const char *path)
}
else
{
char *p = MAX(pf, pb);
const char *p = MAX(pf, pb);
result = M_StringDuplicate(path);
result[p - path] = '\0';
return result;