aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_read.c')
-rw-r--r--libarchive/archive_read.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libarchive/archive_read.c b/libarchive/archive_read.c
index 4a933b2fc084..c59f05153491 100644
--- a/libarchive/archive_read.c
+++ b/libarchive/archive_read.c
@@ -892,15 +892,16 @@ archive_read_data(struct archive *_a, void *buff, size_t s)
len = a->read_data_remaining;
if (len > s)
len = s;
- if (len)
+ if (len) {
memcpy(dest, a->read_data_block, len);
- s -= len;
- a->read_data_block += len;
- a->read_data_remaining -= len;
- a->read_data_output_offset += len;
- a->read_data_offset += len;
- dest += len;
- bytes_read += len;
+ s -= len;
+ a->read_data_block += len;
+ a->read_data_remaining -= len;
+ a->read_data_output_offset += len;
+ a->read_data_offset += len;
+ dest += len;
+ bytes_read += len;
+ }
}
}
a->read_data_is_posix_read = 0;