]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePrintLib/PrintLib.c
Fix a bug in print library "%a" should not print anything if the var argument points...
[mirror_edk2.git] / MdePkg / Library / BasePrintLib / PrintLib.c
index 145ca3494aa73d8ae4951e00d615dd8d37323bef..548ec5490f746308c22048eddbc754c9185d9861 100644 (file)
@@ -355,6 +355,12 @@ BasePrintLibVSPrint (
           Flags &= (~ARGUMENT_UNICODE);\r
           ArgumentString = "<null string>";\r
         }\r
+        //\r
+        // Set the default precision for string to be zero if not specified.\r
+        //\r
+        if ((Flags & PRECISION) == 0) {\r
+          Precision = 0;\r
+        }\r
         break;\r
 \r
       case 'c':\r