aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2020-09-12 00:52:49 +0100
committerTomasz Kramkowski <tk@the-tk.com>2020-09-12 00:52:49 +0100
commit5469e68fa7fa8c4e6865414ecaebe2e1fedfeda8 (patch)
tree44d830f0a8a50133ba7ef7ffafc7606f736cdea6
parentdb37e1d89ce1afdb6fb9efb9fc0502348d18d087 (diff)
downloadpack-5469e68fa7fa8c4e6865414ecaebe2e1fedfeda8.tar.gz
pack-5469e68fa7fa8c4e6865414ecaebe2e1fedfeda8.tar.xz
pack-5469e68fa7fa8c4e6865414ecaebe2e1fedfeda8.zip
unpack: Additional trace information.
-rw-r--r--unpack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unpack.c b/unpack.c
index 0bd51c1..17d9c45 100644
--- a/unpack.c
+++ b/unpack.c
@@ -134,9 +134,9 @@ 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++) {
+ for (size_t j = 0; j < count; j++) {
val.u = read_val(buf + offset + s * j, s, endianness);
- tr_debug("val.u: %" PRIuMAX, val.u);
+ tr_debug("val.u: %" PRIuMAX ", at: %zu", val.u, offset + s * j);
if (fmt[i] == 'f') {
float f = convert_ieee754b32(val.u);