From fd154940eddc54e556d6bfb5147cedbda4750c3e Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 6 Feb 2023 20:08:39 +0100 Subject: Dep/CascLib: Update to ladislav-zezula/CascLib@a5080b5794027a25d98aa6024b2bef17d06fe0ea --- dep/CascLib/src/CascRootFile_OW.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dep/CascLib/src/CascRootFile_OW.cpp') diff --git a/dep/CascLib/src/CascRootFile_OW.cpp b/dep/CascLib/src/CascRootFile_OW.cpp index b270ec76206..b1fbd5b9fec 100644 --- a/dep/CascLib/src/CascRootFile_OW.cpp +++ b/dep/CascLib/src/CascRootFile_OW.cpp @@ -175,7 +175,7 @@ struct TCmfFile { PCMF_HEADER_V3 pHeader3 = (PCMF_HEADER_V3)pbCmfData; - if ((LPBYTE)(pHeader3 + 1) > pbCmfEnd) + if((LPBYTE)(pHeader3 + 1) > pbCmfEnd) return NULL; BuildVersion = pHeader3->BuildVersion; @@ -559,7 +559,7 @@ struct TRootHandler_OW : public TFileTreeRoot // Public functions // TODO: There is way more files in the Overwatch CASC storage than present in the ROOT file. -DWORD RootHandler_CreateOverwatch(TCascStorage * hs, LPBYTE pbRootFile, DWORD cbRootFile) +DWORD RootHandler_CreateOverwatch(TCascStorage * hs, CASC_BLOB & RootFile) { TRootHandler_OW * pRootHandler = NULL; CASC_CSV Csv(0, true); @@ -567,7 +567,7 @@ DWORD RootHandler_CreateOverwatch(TCascStorage * hs, LPBYTE pbRootFile, DWORD cb DWORD dwErrCode; // Load the ROOT file - dwErrCode = Csv.Load(pbRootFile, cbRootFile); + dwErrCode = Csv.Load(RootFile.pbData, RootFile.cbData); if(dwErrCode == ERROR_SUCCESS) { // Retrieve the indices of the file name and MD5 columns @@ -578,11 +578,11 @@ DWORD RootHandler_CreateOverwatch(TCascStorage * hs, LPBYTE pbRootFile, DWORD cb if(Indices[0] != CSV_INVALID_INDEX && Indices[1] != CSV_INVALID_INDEX) { pRootHandler = new TRootHandler_OW(); - if (pRootHandler != NULL) + if(pRootHandler != NULL) { // Load the root directory. If load failed, we free the object dwErrCode = pRootHandler->Load(hs, Csv, Indices[0], Indices[1]); - if (dwErrCode != ERROR_SUCCESS) + if(dwErrCode != ERROR_SUCCESS) { delete pRootHandler; pRootHandler = NULL; -- cgit v1.2.3