make_can_boot_descriptor:Get padding math correct

This commit is contained in:
David Sidrane 2021-01-13 15:37:53 -08:00 committed by Daniel Agar
parent 1ac70cc72f
commit 529841ba7c
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ class FirmwareImage(object):
self._contents.seek(0, os.SEEK_END)
self._length = self._contents.tell()
if self._padding:
fill = self._length % self._padding
fill = self._padding - (self._length % self._padding)
if fill:
self._length += fill
self._padding = fill