Fix unsigned packing bug in merge_regions #8544

pull/8788/head
kert 2018-11-17 17:57:46 -08:00
parent d643034941
commit 6815409fe7
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ def _fill_header(region_list, current_region):
else:
ih = intelhex_offset(region_dict[data].filename, offset=region_dict[data].start)
if subtype.startswith("CRCITT32"):
fmt = {"CRCITT32be": ">l", "CRCITT32le": "<l"}[subtype]
fmt = {"CRCITT32be": ">L", "CRCITT32le": "<L"}[subtype]
header.puts(start, struct.pack(fmt, zlib.crc32(ih.tobinarray())))
elif subtype.startswith("SHA"):
if subtype == "SHA256":