mirror of https://github.com/acidanthera/audk.git
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:
parent
5630456909
commit
faeb3214d4
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue