# HG changeset patch # User Mychaela Falconia # Date 1582869047 0 # Node ID 7ef3343161d6f1259542f94ec88efba6a577ecc7 # Parent 7485e75d947709e25a468e50a80a5fae561102ec srec-regions: report the S7 address as well diff -r 7485e75d9477 -r 7ef3343161d6 miscutil/srec-regions.c --- a/miscutil/srec-regions.c Thu Feb 27 08:12:11 2020 +0000 +++ b/miscutil/srec-regions.c Fri Feb 28 05:50:47 2020 +0000 @@ -162,9 +162,17 @@ region_end = curaddr + datalen; continue; case '7': + if (srecbin[0] < 5) { + fprintf(stderr, + "%s line %d: S7 record is too short\n", + infname, lineno); + exit(1); + } printf("0x%08lX to 0x%08lX (%lu bytes)\n", region_start, region_end, region_end - region_start); + printf("S7 address 0x%02X%02X%02X%02X\n", srecbin[1], + srecbin[2], srecbin[3], srecbin[4]); exit(0); default: abort();