Fix the implementation of AsciiStrStr() and StrStr() in MdePkg. If the length of SearchString is zero, then String is returned.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8297 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
rsun3 2009-05-12 03:33:34 +00:00
parent 5630456909
commit faeb3214d4
1 changed files with 2 additions and 2 deletions

View File

@ -479,7 +479,7 @@ StrStr (
ASSERT (StrSize (SearchString) != 0);
if (*SearchString == L'\0') {
return NULL;
return (CHAR16 *) String;
}
while (*String != L'\0') {
@ -1617,7 +1617,7 @@ AsciiStrStr (
ASSERT (AsciiStrSize (SearchString) != 0);
if (*SearchString == '\0') {
return NULL;
return (CHAR8 *) String;
}
while (*String != '\0') {