From 4b5af8c8d12473f41a41106d4b7fb6f5cb4938bf Mon Sep 17 00:00:00 2001 From: Dan Olson Date: Wed, 23 Apr 2008 03:20:13 -0700 Subject: [PATCH] osezer patch 002 fixed broken defaultfile handling in M_LoadDefaults (basePath must not be changed there. from Steven.) --- base/m_misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/m_misc.c b/base/m_misc.c index a9fe350..6b8cfa5 100644 --- a/base/m_misc.c +++ b/base/m_misc.c @@ -596,7 +596,10 @@ void M_LoadDefaults(char *fileName) } else { - strncpy(defaultfile, strcat(basePath,fileName), 128); + // this is broken: basePath should not be changed here. S.A. + // strncpy(defaultfile, strcat(basePath,fileName), 128); + strncpy(defaultfile, basePath, 128); + strcat (defaultfile, fileName); defaultfile[127] = '\0'; } -- 2.39.2