Commit 92cc5868 authored by Greg Turner's avatar Greg Turner Committed by Alexandre Julliard

Fix some problems when Extract is used more than once.

parent 714148c5
......@@ -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 */
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment