From 7c7168186e432eff167bb27eb7acc830cfd0dbdd Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 24 Mar 2022 12:00:07 +0100 Subject: [PATCH] const char correctness --- Source/m_misc2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/m_misc2.c b/Source/m_misc2.c index e3db869c..b29e72e2 100644 --- a/Source/m_misc2.c +++ b/Source/m_misc2.c @@ -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;