]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the implementation of AsciiStrStr() and StrStr() in MdePkg. If the length of...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 May 2009 03:33:34 +0000 (03:33 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 12 May 2009 03:33:34 +0000 (03:33 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8297 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/String.c

index 50253de04f6a319b70839d41eccc618ab2ed8ece..43ba1447b88d77ef2c2c6070660a323d58a130e7 100644 (file)
@@ -479,7 +479,7 @@ StrStr (
   ASSERT (StrSize (SearchString) != 0);\r
 \r
   if (*SearchString == L'\0') {\r
-    return NULL;\r
+    return (CHAR16 *) String;\r
   }\r
 \r
   while (*String != L'\0') {\r
@@ -1617,7 +1617,7 @@ AsciiStrStr (
   ASSERT (AsciiStrSize (SearchString) != 0);\r
 \r
   if (*SearchString == '\0') {\r
-    return NULL;\r
+    return (CHAR8 *) String;\r
   }\r
 \r
   while (*String != '\0') {\r