diff options
Diffstat (limited to 'dep/CascLib/src/CascIndexFiles.cpp')
-rw-r--r-- | dep/CascLib/src/CascIndexFiles.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dep/CascLib/src/CascIndexFiles.cpp b/dep/CascLib/src/CascIndexFiles.cpp index bc50f9f25bb..98416c2b360 100644 --- a/dep/CascLib/src/CascIndexFiles.cpp +++ b/dep/CascLib/src/CascIndexFiles.cpp @@ -118,6 +118,7 @@ static bool IndexDirectory_OnFileFound( static LPTSTR CreateIndexFileName(TCascStorage * hs, DWORD IndexValue, DWORD IndexVersion) { + TCHAR szFullName[MAX_PATH]; TCHAR szPlainName[0x40]; // Sanity checks @@ -127,7 +128,10 @@ static LPTSTR CreateIndexFileName(TCascStorage * hs, DWORD IndexValue, DWORD Ind // Create the full path CascStrPrintf(szPlainName, _countof(szPlainName), hs->szIndexFormat, IndexValue, IndexVersion); - return CombinePath(hs->szIndexPath, szPlainName); + CombinePath(szFullName, _countof(szFullName), hs->szIndexPath, szPlainName, NULL); + + // Return allocated path + return CascNewStr(szFullName); } static void SaveFileOffsetBitsAndEKeyLength(TCascStorage * hs, BYTE FileOffsetBits, BYTE EKeyLength) |