X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OptionRomPkg%2FLibrary%2FFrameBufferBltLib%2FFrameBufferBltLib.c;h=cfd5212d482478eed64e68c986d11352f83fd0ed;hp=5bb3cfbb28c0fa87ec88459e2150081b89d4bbac;hb=8990b82f4fdf58420ffdb0f7f1a9c100aac8c1ae;hpb=437dfba25bb023f1a9ae351438c14204e950c1f2 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));