Fix the InternalMemScanMem* functions. They were returning the character AFTER the match instead of the matching character.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10821 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
darylm503 2010-08-25 23:06:43 +00:00
parent 0d622b28c3
commit ffadc63799
1 changed files with 4 additions and 4 deletions

View File

@ -163,7 +163,7 @@ InternalMemScanMem8 (
Pointer = (CONST UINT8*)Buffer;
do {
if (*(Pointer++) == Value) {
return Pointer;
return --Pointer;
}
} while (--Length != 0);
return NULL;
@ -193,7 +193,7 @@ InternalMemScanMem16 (
Pointer = (CONST UINT16*)Buffer;
do {
if (*(Pointer++) == Value) {
return Pointer;
return --Pointer;
}
} while (--Length != 0);
return NULL;
@ -223,7 +223,7 @@ InternalMemScanMem32 (
Pointer = (CONST UINT32*)Buffer;
do {
if (*(Pointer++) == Value) {
return Pointer;
return --Pointer;
}
} while (--Length != 0);
return NULL;
@ -253,7 +253,7 @@ InternalMemScanMem64 (
Pointer = (CONST UINT64*)Buffer;
do {
if (*(Pointer++) == Value) {
return Pointer;
return --Pointer;
}
} while (--Length != 0);
return NULL;