From b70f34b696c75dee9af1387d2e1536cd9edffa4b Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 27 Jun 2021 20:20:51 +0200 Subject: Dep/CascLib: Update to ladislav-zezula/CascLib@37a948bdb5f493b6a0959489baa07e1636002c3b --- dep/CascLib/src/CascIndexFiles.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'dep/CascLib/src/CascIndexFiles.cpp') 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) -- cgit v1.2.3