]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiLib/Console.c
Removed CommonHeader.h generated file from the MdePkg.
[mirror_edk2.git] / MdePkg / Library / UefiLib / Console.c
index d06b0a932dee45ceae2d5f0bdba2bd462f3513b9..b549e7e018a715a9e5fee804d93ba92f2961ed7a 100644 (file)
 \r
 \r
 \r
+//\r
+// Include common header file for this module.\r
+//\r
+#include "UefiLibInternal.h"\r
+\r
 typedef struct {\r
   CHAR16  WChar;\r
   UINT32  Width;\r
@@ -263,6 +268,10 @@ UnicodeStringDisplayLength (
   UINTN      Length;\r
   UINTN      Width;\r
 \r
+  if (String == NULL) {\r
+    return 0;\r
+  }\r
+\r
   Length = 0;\r
   while (*String != 0) {\r
     Width = GetGlyphWidth (*String);\r