From 8fb214c32256906fbd8cacab42cfbd7fb0211e53 Mon Sep 17 00:00:00 2001 From: Alex Matrosov Date: Sun, 10 Dec 2017 21:39:47 -0800 Subject: [PATCH] Update ffsparser.cpp --- common/ffsparser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index 7b27b91..e35d553 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -956,7 +956,7 @@ USTATUS FfsParser::parseVolumeHeader(const UByteArray & volume, const UINT32 loc } else if (volumeHeader->Revision == 2) { // Acquire alignment - alignment = (UINT32)pow(2.0, (INT32)(volumeHeader->Attributes & EFI_FVB2_ALIGNMENT) >> 16); + alignment = (UINT32)(1UL << ((volumeHeader->Attributes & EFI_FVB2_ALIGNMENT) >> 16)); // Check alignment if (!isUnknown && !model->compressed(parent) && ((model->offset(parent) + localOffset - capsuleOffsetFixup) % alignment)) msgUnaligned = true;