]> wimlib.net Git - wimlib/commitdiff
resource.c: Fix reading pipable resources
authorEric Biggers <ebiggers3@gmail.com>
Fri, 13 Dec 2013 09:27:48 +0000 (03:27 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 13 Dec 2013 09:27:48 +0000 (03:27 -0600)
src/resource.c

index b38c65d0536d4e0a99d08087a9676b54100e3827..13a0c3921342b0416f61634866e935ff508404ea 100644 (file)
@@ -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.  */
                }
 
                /* 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
        }
 
        /* If using a callback function, allocate a temporary buffer that will