diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index a9c4c10951..b082f0a6de 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -98,7 +98,7 @@ GetPcdType ( case PCD_DATUM_TYPE_POINTER: return EFI_PCD_TYPE_PTR; case PCD_DATUM_TYPE_UINT8: - if (LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) { + if ((LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) == PCD_DATUM_TYPE_UINT8_BOOLEAN) { return EFI_PCD_TYPE_BOOL; } else { return EFI_PCD_TYPE_8; diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index a4e35c2792..4fb8b4a687 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -72,7 +72,7 @@ GetPcdType ( case PCD_DATUM_TYPE_POINTER: return EFI_PCD_TYPE_PTR; case PCD_DATUM_TYPE_UINT8: - if (LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) { + if ((LocalTokenNumber & PCD_DATUM_TYPE_UINT8_BOOLEAN) == PCD_DATUM_TYPE_UINT8_BOOLEAN) { return EFI_PCD_TYPE_BOOL; } else { return EFI_PCD_TYPE_8;