skip header only if address is zero
authorMichael Gernoth <michael@gernoth.net>
Sat, 5 Sep 2020 20:19:44 +0000 (22:19 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sat, 5 Sep 2020 20:19:44 +0000 (22:19 +0200)
extract.c

index 7d7c9d1987113a0531c4a131168d6254f2bb65f2..0e8699c043fcfe83f3013d7a8ffe26ea5f7f04e0 100644 (file)
--- 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",
Impressum, Datenschutz