From: Michael Gernoth Date: Sat, 5 Sep 2020 20:19:44 +0000 (+0200) Subject: skip header only if address is zero X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/32620_extract/commitdiff_plain/948342d1e4a54233400226fbafd1e7584a5affa4?ds=sidebyside skip header only if address is zero --- 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",