diff --git a/EdkCompatibilityPkg/Compatibility/FvToFv2Thunk/FvToFv2Thunk.c b/EdkCompatibilityPkg/Compatibility/FvToFv2Thunk/FvToFv2Thunk.c index 27eb64aa0d..ca23c1634d 100644 --- a/EdkCompatibilityPkg/Compatibility/FvToFv2Thunk/FvToFv2Thunk.c +++ b/EdkCompatibilityPkg/Compatibility/FvToFv2Thunk/FvToFv2Thunk.c @@ -375,7 +375,7 @@ FvGetVolumeAttributes ( Attributes ); if (!EFI_ERROR (Status)) { - *Attributes = (*Attributes & 0x1ff) | ((UINTN)EFI_FV_ALIGNMENT_2 << ((*Attributes & EFI_FV2_ALIGNMENT) >> 16)); + *Attributes = (*Attributes & 0x1ff) | ((UINTN)EFI_FV_ALIGNMENT_2 << RShiftU64((*Attributes & EFI_FV2_ALIGNMENT), 16)); } return Status; }