From f95176a5b8bfd253a2e90841055a573209ef5d4d Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Wed, 23 May 2018 12:39:43 +0300 Subject: [PATCH] config: Fix const correctness issue in M_GetSaveGameDir Some paths return a new string so all paths must return a new string. Otherwise the caller wouldn't know whether to release it or not. --- src/m_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_config.c b/src/m_config.c index 66ea73fd..38ee1d82 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -2246,7 +2246,7 @@ char *M_GetSaveGameDir(char *iwadname) else if (M_ParmExists("-cdrom")) { - savegamedir = configdir; + savegamedir = M_StringDuplicate(configdir); } #endif // If not "doing" a configuration directory (Windows), don't "do"