summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'EdkModulePkg/Library')
-rw-r--r--EdkModulePkg/Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/EdkModulePkg/Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64.c b/EdkModulePkg/Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64.c
index a2862576fa..6adc4bf29e 100644
--- a/EdkModulePkg/Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64.c
+++ b/EdkModulePkg/Library/EdkPeCoffLoaderX64Lib/EdkPeCoffLoaderX64.c
@@ -536,7 +536,7 @@ Returns:
break;
case EFI_IMAGE_REL_BASED_HIGH:
F16 = (UINT16 *) Fixup;
- *F16 = (UINT16)((*F16 << 16) + (UINT16) Adjust);
+ *F16 = (UINT16) (*F16 + ((UINT16) ((UINT32) Adjust >> 16)));
if (FixupData != NULL) {
*(UINT16 *) FixupData = *F16;
FixupData = FixupData + sizeof(UINT16);