summaryrefslogtreecommitdiff
path: root/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c')
-rw-r--r--OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
index 5bb3cfbb28..cfd5212d48 100644
--- a/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
+++ b/OptionRomPkg/Library/FrameBufferBltLib/FrameBufferBltLib.c
@@ -65,9 +65,8 @@ ConfigurePixelBitMaskFormat (
}
MergedMasks = (UINT32) (MergedMasks | Masks[3]);
- mBltLibBytesPerPixel = HighBitSet32 (MergedMasks);
- ASSERT (mBltLibBytesPerPixel >= 0);
- mBltLibBytesPerPixel = (mBltLibBytesPerPixel + 7) / 8;
+ ASSERT (MergedMasks != 0);
+ mBltLibBytesPerPixel = (HighBitSet32 (MergedMasks) + 7) / 8;
DEBUG ((EFI_D_INFO, "Bytes per pixel: %d\n", mBltLibBytesPerPixel));