Fix bug with files that are multiples of 1024.
This commit is contained in:
parent
465cbde339
commit
c859cd88dc
@ -20,9 +20,9 @@ with open(FILE, "rb") as f:
|
|||||||
csum_pre = csum
|
csum_pre = csum
|
||||||
csum += c
|
csum += c
|
||||||
csum &= 0xff
|
csum &= 0xff
|
||||||
|
last_byte = c
|
||||||
if len(block) < 1024:
|
if len(block) < 1024:
|
||||||
print("End reached.")
|
print("End reached.")
|
||||||
last_byte = unpack("B", block[-1:])[0]
|
|
||||||
break
|
break
|
||||||
|
|
||||||
print("Sum of all bytes: {:02x}".format(csum))
|
print("Sum of all bytes: {:02x}".format(csum))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user