]> git.proxmox.com Git - mirror_edk2.git/commitdiff
correct on bug in DebugLib instance.
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Nov 2007 08:16:50 +0000 (08:16 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 22 Nov 2007 08:16:50 +0000 (08:16 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4321 6f19259b-4bc3-4df7-8a09-765794883524

OldMdePkg/Library/UefiDebugLibConOut/DebugLib.c
OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c

index b3e83894c8ab9c4bdb78fe323432cdd37c1f74a1..24ae1386c0b4e5eebb21b7362c8a70780d5caa5a 100644 (file)
@@ -41,6 +41,7 @@ DebugPrint (
   )\r
 {\r
   CHAR16   Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8    AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
   VA_LIST  Marker;\r
 \r
   //\r
@@ -59,9 +60,11 @@ DebugPrint (
   // Convert the DEBUG() message to a Unicode String\r
   //\r
   VA_START (Marker, Format);\r
-  UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker);\r
+  AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);\r
+  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
   VA_END (Marker);\r
 \r
+\r
   //\r
   // Send the print string to the Console Output device\r
   //\r
@@ -103,11 +106,13 @@ DebugAssert (
   )\r
 {\r
   CHAR16  Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8   AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
 \r
   //\r
   // Generate the ASSERT() message in Unicode format\r
   //\r
-  UnicodeSPrintAsciiFormat (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);\r
+  AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);\r
+  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
 \r
   //\r
   // Send the print string to the Console Output device\r
index d2fb46e23f340f2aec64b6dce50101c391f138f0..fc28213487e284d1871a47e243dde0cf3f59456b 100644 (file)
@@ -41,6 +41,7 @@ DebugPrint (
   )\r
 {\r
   CHAR16   Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8    AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
   VA_LIST  Marker;\r
 \r
   //\r
@@ -59,7 +60,8 @@ DebugPrint (
   // Convert the DEBUG() message to a Unicode String\r
   //\r
   VA_START (Marker, Format);\r
-  UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker);\r
+  AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);\r
+  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
   VA_END (Marker);\r
 \r
   //\r
@@ -103,11 +105,13 @@ DebugAssert (
   )\r
 {\r
   CHAR16  Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
+  CHAR8   AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];\r
 \r
   //\r
   // Generate the ASSERT() message in Unicode format\r
   //\r
-  UnicodeSPrintAsciiFormat (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);\r
+  AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);\r
+  AsciiStrToUnicodeStr (AsciiBuffer, Buffer);\r
 \r
   //\r
   // Send the print string to the Standard Error device\r