From fb32b46af832f1bed36f016c126ca16613c4f9fb Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 13 Dec 2013 03:27:48 -0600 Subject: [PATCH] resource.c: Fix reading pipable resources --- src/resource.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/resource.c b/src/resource.c index b38c65d0..13a0c392 100644 --- a/src/resource.c +++ b/src/resource.c @@ -280,7 +280,11 @@ read_compressed_wim_resource(const struct wim_lookup_table_entry * const lte, } /* Set offset to beginning of first chunk to read. */ - cur_read_offset += chunk_table_size + chunk_offsets[0]; + cur_read_offset += chunk_offsets[0]; + if (lte->is_pipable) + cur_read_offset += start_chunk * sizeof(struct pwm_chunk_hdr); + else + cur_read_offset += chunk_table_size; } /* If using a callback function, allocate a temporary buffer that will -- 2.43.0