]> wimlib.net Git - wimlib/blobdiff - src/win32_capture.c
test-imagex-ntfs: Try to work around yet another race condition
[wimlib] / src / win32_capture.c
index 8004f417d3c9e4a951cf4d25b47a82c2f32df45c..71e6c840ab3c6f7f9186768813f2272778fbb25f 100644 (file)
@@ -110,6 +110,9 @@ win32_encrypted_export_cb(unsigned char *data, void *_ctx, unsigned long len)
        int ret;
        size_t bytes_to_consume = min(len, ctx->bytes_remaining);
 
+       if (bytes_to_consume == 0)
+               return ERROR_SUCCESS;
+
        ret = (*ctx->read_prefix_cb)(data, bytes_to_consume, ctx->read_prefix_ctx);
        if (ret) {
                ctx->wimlib_err_code = ret;