From 948342d1e4a54233400226fbafd1e7584a5affa4 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 5 Sep 2020 22:19:44 +0200 Subject: [PATCH] skip header only if address is zero --- extract.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extract.c b/extract.c index 7d7c9d1..0e8699c 100644 --- a/extract.c +++ b/extract.c @@ -89,7 +89,7 @@ int main(int argc, char **argv) amp = header[i+2] & 0x3; adr = ((hi << 8) | lo) + (cs * 8192); - if (cs == 0) + if (adr == 0) adr += sizeof(header); printf("%02d. hi: 0x%02x, lo: 0x%02x, cs: 0x%02x -> adr: 0x%04x; amp: 0x%02x\n", -- 2.39.5