From 8765d3a46e06e8ec7a50604de83eae574882560b Mon Sep 17 00:00:00 2001 From: OTHGMars Date: Mon, 11 Jan 2021 04:54:41 -0500 Subject: [PATCH] Con::isBasePath() performs the same path expansion on both input paths. --- Engine/source/console/console.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Engine/source/console/console.cpp b/Engine/source/console/console.cpp index 4d6519514..d2c3ec85f 100644 --- a/Engine/source/console/console.cpp +++ b/Engine/source/console/console.cpp @@ -2270,9 +2270,10 @@ bool expandPath(char* pDstPath, U32 size, const char* pSrcPath, const char* pWor bool isBasePath(const char* SrcPath, const char* pBasePath) { - char expandBuffer[1024]; + char expandBuffer[1024], expandBaseBuffer[1024]; Con::expandPath(expandBuffer, sizeof(expandBuffer), SrcPath); - return dStrnicmp(pBasePath, expandBuffer, dStrlen(pBasePath)) == 0; + Con::expandPath(expandBaseBuffer, sizeof(expandBaseBuffer), pBasePath); + return dStrnicmp(expandBaseBuffer, expandBuffer, dStrlen(expandBaseBuffer)) == 0; } //-----------------------------------------------------------------------------