]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/String.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / String.c
index 150f650598edab41c3c4cb4314b5a26071d84b6f..fcc9625769c359c8f281dd7399ade30b29f45146 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
 http://opensource.org/licenses/bsd-license.php                                            \r
@@ -593,7 +593,7 @@ HexStringToBuf (
     } else {\r
       Byte = Buf[Idx / 2];\r
       Byte &= 0x0F;\r
-      Byte |= Digit << 4;\r
+      Byte = (UINT8)(Byte | (Digit << 4));\r
     }\r
 \r
     Buf[Idx / 2] = Byte;\r
@@ -749,9 +749,11 @@ Returns:
   Sub = StrCharSet;\r
   \r
   while ((*String != L'\0') && (*StrCharSet != L'\0')) {\r
-    if (*String++ != *StrCharSet++) {\r
+    if (*String++ != *StrCharSet) {\r
       String = ++Src;\r
       StrCharSet = Sub;\r
+    } else {\r
+      StrCharSet++;\r
     }\r
   }\r
   if (*StrCharSet == L'\0') {\r
@@ -788,9 +790,11 @@ Returns:
   Sub = StrCharSet;\r
   \r
   while ((*String != '\0') && (*StrCharSet != '\0')) {\r
-    if (*String++ != *StrCharSet++) {\r
+    if (*String++ != *StrCharSet) {\r
       String = ++Src;\r
       StrCharSet = Sub;\r
+    } else {\r
+      StrCharSet++;\r
     }\r
   }\r
   if (*StrCharSet == '\0') {\r