Fix some problems when Extract is used more than once.

This commit is contained in:
Greg Turner 2003-01-23 21:22:24 +00:00 committed by Alexandre Julliard
parent 714148c555
commit 92cc5868ae
2 changed files with 6 additions and 2 deletions

View File

@ -46,6 +46,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
*/
cab_UBYTE search_buf[CAB_SEARCH_SIZE];
cab_decomp_state decomp_state;
/* all the file IO is abstracted into these routines:
* cabinet_(open|close|read|seek|skip|getoffset)
* file_(open|close|write)
@ -2771,6 +2773,8 @@ BOOL process_cabinet(LPCSTR cabname, LPCSTR dir, BOOL fix, BOOL lower)
/* has the list-mode header been seen before? */
int viewhdr = 0;
ZeroMemory(&decomp_state, sizeof(cab_decomp_state));
TRACE("Extract %s\n", debugstr_a(cabname));
/* load the file requested */

View File

@ -269,7 +269,7 @@ struct cabinet {
cab_UBYTE flags; /* header flags */
};
struct {
typedef struct {
struct cab_folder *current; /* current folder we're extracting from */
cab_ULONG offset; /* uncompressed offset within folder */
cab_UBYTE *outpos; /* (high level) start of data to use up */
@ -283,7 +283,7 @@ struct {
struct QTMstate qtm;
struct LZXstate lzx;
} methods;
} decomp_state;
} cab_decomp_state;
/* from cabextract.c */
BOOL process_cabinet(LPCSTR cabname, LPCSTR dir, BOOL fix, BOOL lower);