]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/Sec/SecMain.c
Nt32Pkg: Fix asserts from running Nt32 64-bit on Win8
[mirror_edk2.git] / Nt32Pkg / Sec / SecMain.c
index e6eb3cf45e05575f17adf15104a49dd0acb2e0b6..e9f72dfba10e39460e5f0b5115ad10d0705dfd3b 100644 (file)
@@ -1,6 +1,7 @@
 /**@file\r
 \r
 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -809,7 +810,7 @@ Returns:
   // Align buffer on section boundry\r
   //\r
   ImageContext.ImageAddress += ImageContext.SectionAlignment - 1;\r
-  ImageContext.ImageAddress &= ~(ImageContext.SectionAlignment - 1);\r
+  ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1);\r
 \r
   Status = PeCoffLoaderLoadImage (&ImageContext);\r
   if (EFI_ERROR (Status)) {\r