]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OldMdePkg/Library/UefiDebugLibStdErr/DebugLib.c
correct on bug in DebugLib instance.
[mirror_edk2.git] / OldMdePkg / Library / UefiDebugLibStdErr / DebugLib.c
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