simg_dump.py: fix error for CHUNK_TYPE_FILL
In python3, division of two integers produces a float, which cannot be used to multiply a bytes sequence. Using // to produce an integer quotient. Bug: 245257511 Test: ./system/core/libsparse/simg_dump.py -sv path/to/image Change-Id: Ibe95056409ac3676a68f5e7693331ca4a66e9fb7
This commit is contained in:
parent
9f7a19d0f3
commit
dbf62d939a
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ def main():
|
|||
curtype = format("Fill with 0x%08X" % (fill))
|
||||
if showhash:
|
||||
h = hashlib.sha1()
|
||||
data = fill_bin * (blk_sz / 4);
|
||||
data = fill_bin * (blk_sz // 4);
|
||||
for block in range(chunk_sz):
|
||||
h.update(data)
|
||||
curhash = h.hexdigest()
|
||||
|
|
Loading…
Reference in a new issue