aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2020-09-12 00:52:47 +0100
committerTomasz Kramkowski <tk@the-tk.com>2020-09-12 00:52:47 +0100
commitdb37e1d89ce1afdb6fb9efb9fc0502348d18d087 (patch)
tree85d59377683df3dd9e9b193d045175a307099e67
parent2c54cca234c95b232f59d9e5e478dcfac903823f (diff)
downloadpack-db37e1d89ce1afdb6fb9efb9fc0502348d18d087.tar.gz
pack-db37e1d89ce1afdb6fb9efb9fc0502348d18d087.tar.xz
pack-db37e1d89ce1afdb6fb9efb9fc0502348d18d087.zip
unpack: Actually use the buffer offset...
-rw-r--r--unpack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unpack.c b/unpack.c
index 8691519..0bd51c1 100644
--- a/unpack.c
+++ b/unpack.c
@@ -135,7 +135,7 @@ enum pack_status unpack(const void *buf_, size_t size, const char *fmt, ...)
if (fmt[i] == 'x') goto skip;
for (unsigned long long j = 0; j < count; j++) {
- val.u = read_val(buf + s * j, s, endianness);
+ val.u = read_val(buf + offset + s * j, s, endianness);
tr_debug("val.u: %" PRIuMAX, val.u);
if (fmt[i] == 'f') {