r809 - trunk/archivers
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Mar 10 01:26:11 EST 2007
Author: icculus
Date: 2007-03-10 01:26:11 -0500 (Sat, 10 Mar 2007)
New Revision: 809
Modified:
trunk/archivers/lzma.c
Log:
Patched to compile.
Modified: trunk/archivers/lzma.c
===================================================================
--- trunk/archivers/lzma.c 2007-03-10 06:24:56 UTC (rev 808)
+++ trunk/archivers/lzma.c 2007-03-10 06:26:11 UTC (rev 809)
@@ -289,7 +289,9 @@
/* Only decompress the folder if it is not allready cached */
if (entry->archive->folder[entry->folderIndex].cache == NULL)
- if (lzma_err(SzExtract(
+ {
+ size_t tmpsize = entry->archive->folder[entry->folderIndex].size;
+ int rc = lzma_err(SzExtract(
&entry->archive->stream.InStream, /* compressed data */
&entry->archive->db,
entry->fileIndex,
@@ -298,14 +300,17 @@
/* Cache for decompressed folder, allocated/freed by SzExtract */
&entry->archive->folder[entry->folderIndex].cache,
/* Size of cache, will be changed by SzExtract */
- &entry->archive->folder[entry->folderIndex].size,
+ &tmpsize,
/* Offset of this file inside the cache, set by SzExtract */
&entry->offset,
&fileSize, /* Size of this file */
&allocImp,
- &allocTempImp
- )) != SZ_OK)
+ &allocTempImp));
+
+ entry->archive->folder[entry->folderIndex].size = tmpsize;
+ if (rc != SZ_OK)
return -1;
+ } /* if */
/* Copy wanted bytes over from cache to outBuffer */
strncpy(outBuffer,
More information about the physfs-commits
mailing list