浏览代码

Con::isBasePath() performs the same path expansion on both input paths.

OTHGMars 4 年之前
父节点
当前提交
8765d3a46e
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      Engine/source/console/console.cpp

+ 3 - 2
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;
 }
 
 //-----------------------------------------------------------------------------