X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fresource.c;h=7631dd492309283bb7d8fa72a569004f64ae619d;hb=8c88e5712612601cec92d4ca81f86a6e9db1781e;hp=ea2ff5fec573a4b4f5f7630e9db4c24cf0dcb174;hpb=3eba9411dba38757a990330ea3889f3be3eb20d9;p=wimlib diff --git a/src/resource.c b/src/resource.c index ea2ff5fe..7631dd49 100644 --- a/src/resource.c +++ b/src/resource.c @@ -1002,9 +1002,9 @@ streamifier_cb(const void *chunk, size_t size, void *_ctx) /* Consume the chunk. */ ret = (*ctx->cbs.consume_chunk)(chunk, size, ctx->cbs.consume_chunk_ctx); + ctx->cur_stream_offset += size; if (ret) return ret; - ctx->cur_stream_offset += size; if (ctx->cur_stream_offset == ctx->cur_stream->size) { /* Finished reading all the data for a stream. */