diff options
author | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-12 03:33:34 +0000 |
---|---|---|
committer | rsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-12 03:33:34 +0000 |
commit | faeb3214d42feebf843a8bb7bafbd3754b51d5b8 (patch) | |
tree | 97d99faa35175a2114527cf4937d818c27c610ba /MdePkg/Library/BaseLib/String.c | |
parent | 56304569090565f5b8a24c365de38f47c7b0217c (diff) | |
download | edk2-platforms-faeb3214d42feebf843a8bb7bafbd3754b51d5b8.tar.xz |
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
Diffstat (limited to 'MdePkg/Library/BaseLib/String.c')
-rw-r--r-- | MdePkg/Library/BaseLib/String.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c index 50253de04f..43ba1447b8 100644 --- a/MdePkg/Library/BaseLib/String.c +++ b/MdePkg/Library/BaseLib/String.c @@ -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') {
|