aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/CascIndexFiles.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2021-06-27 20:20:51 +0200
committerShauren <shauren.trinity@gmail.com>2021-06-27 20:20:51 +0200
commitb70f34b696c75dee9af1387d2e1536cd9edffa4b (patch)
treec53d89e5c84264d183cea463f6a214f5c0963911 /dep/CascLib/src/CascIndexFiles.cpp
parent0bbf3f7300895008a37796f3d5be7e8f23c9a143 (diff)
Dep/CascLib: Update to ladislav-zezula/CascLib@37a948bdb5f493b6a0959489baa07e1636002c3b
Diffstat (limited to 'dep/CascLib/src/CascIndexFiles.cpp')
-rw-r--r--dep/CascLib/src/CascIndexFiles.cpp6
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)