Allow 252-byte binaries to be checksummed (#764)

Fixes #740
This commit is contained in:
Andrew Scheller 2022-04-04 21:46:34 +01:00 committed by GitHub
parent 1896b1491b
commit 17d53af105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ try:
except:
sys.exit("Could not open input file '{}'".format(args.ifile))
if len(idata) >= args.pad - 4:
if len(idata) > args.pad - 4:
sys.exit("Input file size ({} bytes) too large for final size ({} bytes)".format(len(idata), args.pad))
idata_padded = idata + bytes(args.pad - 4 - len(idata))