From 529841ba7c434bf4703935bf867eccf9709c1d6f Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 13 Jan 2021 15:37:53 -0800 Subject: [PATCH] make_can_boot_descriptor:Get padding math correct --- Tools/make_can_boot_descriptor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/make_can_boot_descriptor.py b/Tools/make_can_boot_descriptor.py index 6f03e8a1e01..5ca4f168f4f 100755 --- a/Tools/make_can_boot_descriptor.py +++ b/Tools/make_can_boot_descriptor.py @@ -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