summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePrintLib
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BasePrintLib')
-rw-r--r--MdePkg/Library/BasePrintLib/PrintLib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/MdePkg/Library/BasePrintLib/PrintLib.c b/MdePkg/Library/BasePrintLib/PrintLib.c
index f2c7ee5807..84dceb6e85 100644
--- a/MdePkg/Library/BasePrintLib/PrintLib.c
+++ b/MdePkg/Library/BasePrintLib/PrintLib.c
@@ -235,6 +235,10 @@ BasePrintLibVSPrint (
// Handle each argument type
//
switch (FormatCharacter) {
+ case 'p':
+ if (sizeof (VOID *) > 4) {
+ Flags |= LONG_TYPE;
+ }
case 'X':
Flags |= PREFIX_ZERO;
//
@@ -247,7 +251,7 @@ BasePrintLibVSPrint (
//
case 'd':
if ((Flags & LONG_TYPE) == 0) {
- Value = (VA_ARG (Marker, INTN));
+ Value = (VA_ARG (Marker, int));
} else {
Value = VA_ARG (Marker, INT64);
}
@@ -275,7 +279,7 @@ BasePrintLibVSPrint (
Radix = 16;
Comma = FALSE;
if ((Flags & LONG_TYPE) == 0 && Value < 0) {
- Value = (UINTN)Value;
+ Value = (unsigned int)Value;
}
}
//