cnvogelg / amitools

Various tools for using AmigaOS programs on other platforms
250 stars 69 forks source link

Wrong checksum for 2-sector bootblocks #197

Closed atsampson closed 4 months ago

atsampson commented 5 months ago

The code in BootBlock._calc_chksum skips the second word in each block when computing the checksum, so it doesn't include the checksum itself in the calculation. However, this is only correct for the first block - if you've got a bootblock that's bigger than 512 bytes, it'll produce the wrong checksum.