From db37e1d89ce1afdb6fb9efb9fc0502348d18d087 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Sat, 12 Sep 2020 00:52:47 +0100 Subject: unpack: Actually use the buffer offset... --- unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') { -- cgit v1.2.3-54-g00ecf