summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-22 08:16:50 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-22 08:16:50 +0000
commitfe123a5e88a6d5ef92b0aa2f17717b53ec27e9ca (patch)
tree9b5916de62d5c2dedd59d20cb450fd0017ef88d7
parent4cc9af6c58a912e781fefe173953db531d3eff8d (diff)
downloadedk2-platforms-fe123a5e88a6d5ef92b0aa2f17717b53ec27e9ca.tar.xz
correct on bug in DebugLib instance.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4321 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--OldMdePkg/Library/UefiDebugLibConOut/DebugLib.c9
-rw-r--r--OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c8
2 files changed, 13 insertions, 4 deletions
diff --git a/OldMdePkg/Library/UefiDebugLibConOut/DebugLib.c b/OldMdePkg/Library/UefiDebugLibConOut/DebugLib.c
index b3e83894c8..24ae1386c0 100644
--- a/OldMdePkg/Library/UefiDebugLibConOut/DebugLib.c
+++ b/OldMdePkg/Library/UefiDebugLibConOut/DebugLib.c
@@ -41,6 +41,7 @@ DebugPrint (
)
{
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
+ CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
VA_LIST Marker;
//
@@ -59,9 +60,11 @@ DebugPrint (
// Convert the DEBUG() message to a Unicode String
//
VA_START (Marker, Format);
- UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker);
+ AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);
+ AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
VA_END (Marker);
+
//
// Send the print string to the Console Output device
//
@@ -103,11 +106,13 @@ DebugAssert (
)
{
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
+ CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
//
// Generate the ASSERT() message in Unicode format
//
- UnicodeSPrintAsciiFormat (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);
+ AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);
+ AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
//
// Send the print string to the Console Output device
diff --git a/OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c
index d2fb46e23f..fc28213487 100644
--- a/OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c
+++ b/OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c
@@ -41,6 +41,7 @@ DebugPrint (
)
{
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
+ CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
VA_LIST Marker;
//
@@ -59,7 +60,8 @@ DebugPrint (
// Convert the DEBUG() message to a Unicode String
//
VA_START (Marker, Format);
- UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker);
+ AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);
+ AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
VA_END (Marker);
//
@@ -103,11 +105,13 @@ DebugAssert (
)
{
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
+ CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
//
// Generate the ASSERT() message in Unicode format
//
- UnicodeSPrintAsciiFormat (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);
+ AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);
+ AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
//
// Send the print string to the Standard Error device