summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePrintLib/PrintLibInternal.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-28 09:41:50 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-28 09:41:50 +0000
commitab1096fdf6d3e2d6acb67e8bdf884af8bbc2d8fe (patch)
treec49c5887c602a0821ca3dc8f571ba72bdc8631fc /MdePkg/Library/BasePrintLib/PrintLibInternal.c
parenteb6f7758565616762bf1b7143f5f336abadb6d16 (diff)
downloadedk2-platforms-ab1096fdf6d3e2d6acb67e8bdf884af8bbc2d8fe.tar.xz
1.BaseMemoryLibMmx: Add X64 Cpu Arch support.
2.BasePrintLib: Fix some minor bugs git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@651 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BasePrintLib/PrintLibInternal.c')
-rw-r--r--MdePkg/Library/BasePrintLib/PrintLibInternal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
index 9314b60911..30b4539141 100644
--- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c
+++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c
@@ -158,6 +158,7 @@ BasePrintLibConvertValueToString (
if (Value < 0) {
Value = -Value;
Buffer = BasePrintLibFillBuffer (Buffer, 1, '-', Increment);
+ Width--;
}
Count = BasePrintLibValueToString (ValueBuffer, Value, 10);
@@ -166,7 +167,10 @@ BasePrintLibConvertValueToString (
Buffer = BasePrintLibFillBuffer (Buffer, Width - Count, '0', Increment);
}
- Digits = 3 - (Count % 3);
+ Digits = Count % 3;
+ if (Digits != 0) {
+ Digits = 3 - Digits;
+ }
for (Index = 0; Index < Count; Index++) {
Buffer = BasePrintLibFillBuffer (Buffer, 1, ValueBuffer[Count - Index], Increment);
if ((Flags & COMMA_TYPE) != 0) {