aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/CascReadFile.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-04-03 10:21:30 +0200
committerShauren <shauren.trinity@gmail.com>2016-04-03 10:21:30 +0200
commit77761e819506075b28c1b4eaf3fb295cc544c838 (patch)
tree694123b8a8bf2c70d94b09b44f1dcb576f0127e4 /dep/CascLib/src/CascReadFile.cpp
parente320ce27c578b21b8611ecfb01084a205790e2e6 (diff)
Dep/CascLib: Update to ladislav-zezula/CascLib@d477d30f7c2b3a306fd07c92929950639335fb3f
Diffstat (limited to 'dep/CascLib/src/CascReadFile.cpp')
-rw-r--r--dep/CascLib/src/CascReadFile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/dep/CascLib/src/CascReadFile.cpp b/dep/CascLib/src/CascReadFile.cpp
index 72eb2c4b647..76227449461 100644
--- a/dep/CascLib/src/CascReadFile.cpp
+++ b/dep/CascLib/src/CascReadFile.cpp
@@ -146,7 +146,7 @@ static int EnsureHeaderAreaIsLoaded(TCascFile * hf)
hs->dwFileBeginDelta = (FileSignature == BLTE_HEADER_SIGNATURE) ? BLTE_HEADER_DELTA : 0;
}
-
+
// If the file size is not loaded yet, do it
if(hf->FrameCount == 0)
{
@@ -225,7 +225,7 @@ static int EnsureFrameHeadersLoaded(TCascFile * hf)
{
// Offset of the first frame is right after the file frames
hf->FramesOffset = hf->HeaderOffset + sizeof(DWORD) + sizeof(DWORD);
-
+
hf->pFrames[0].FrameArchiveOffset = hf->FramesOffset;
hf->pFrames[0].FrameFileOffset = 0;
hf->pFrames[0].CompressedSize = hf->CompressedSize;
@@ -288,12 +288,12 @@ static int ProcessFileFrame(
// Perform the loop
for(;;)
{
- // Set the output buffer.
+ // Set the output buffer.
// Even operations: extract to temporary buffer
// Odd operations: extract to output buffer
pbWorkBuffer = (dwStepCount & 0x01) ? pbOutBuffer : pbTempBuffer;
cbWorkBuffer = (dwStepCount & 0x01) ? cbOutBuffer : cbTempBuffer;
-
+
// Perform the operation specific to the operation ID
switch(pbInBuffer[0])
{
@@ -530,7 +530,7 @@ bool WINAPI CascReadFile(HANDLE hFile, void * pvBuffer, DWORD dwBytesToRead, PDW
{
if(hf->pbFileCache != NULL)
CASC_FREE(hf->pbFileCache);
-
+
hf->pbFileCache = CASC_ALLOC(BYTE, pFrame->FrameSize);
hf->cbFileCache = pFrame->FrameSize;
}
@@ -546,7 +546,7 @@ bool WINAPI CascReadFile(HANDLE hFile, void * pvBuffer, DWORD dwBytesToRead, PDW
// Load the raw file data to memory
FileOffset = pFrame->FrameArchiveOffset;
bReadResult = FileStream_Read(hf->pStream, &FileOffset, pbFrameData, pFrame->CompressedSize);
-
+
// Note: The raw file data size could be less than expected
// Happened in WoW build 19342 with the ROOT file. MD5 in the frame header
// is zeroed, which means it should not be checked