diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cc4group.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cc4group.c b/src/cc4group.c index a90a4e8..25e354d 100644 --- a/src/cc4group.c +++ b/src/cc4group.c @@ -426,7 +426,7 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback uint8_t* retData = NULL; size_t currentSize = 0; CC4Group_CleanupJob tmpCleanup; - uint8_t* mappedTmpFile = NULL; + uint8_t* uncompressedData = NULL; if(initCallback != NULL) { @@ -614,12 +614,12 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback currentSize += uncompressedSize; - mappedTmpFile = cc4group_tmpMemoryStrategy(this, currentSize, &tmpCleanup); + uncompressedData = cc4group_tmpMemoryStrategy(this, currentSize, &tmpCleanup); - uint8_t* data = (uint8_t*)(mappedTmpFile) + sizeof(C4GroupHeader) + sizeof(C4GroupEntryCore) * header->Entries; + uint8_t* data = (uint8_t*)(uncompressedData) + sizeof(C4GroupHeader) + sizeof(C4GroupEntryCore) * header->Entries; // write alredy decompressed header and cores into the file - memcpy(mappedTmpFile, header, data - mappedTmpFile); + memcpy(uncompressedData, header, data - uncompressedData); strm.next_out = data; strm.avail_out = uncompressedSize; @@ -651,7 +651,7 @@ static bool cc4group_uncompressGroup(CC4Group* const this, CC4Group_ReadCallback goto ret; } - retData = mappedTmpFile; + retData = uncompressedData; ret: if(readData != NULL) @@ -669,11 +669,11 @@ ret: inflateEnd(&strm); } - if(retData == NULL && mappedTmpFile != NULL) + if(retData == NULL && uncompressedData != NULL) { tmpCleanup.func(tmpCleanup.data); } - else if(mappedTmpFile != NULL) + else if(uncompressedData != NULL) { CleanUpJobListPrepend(this->cleanupJobs, tmpCleanup); } |
