diff options
author | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-08-25 23:06:43 +0000 |
---|---|---|
committer | darylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-08-25 23:06:43 +0000 |
commit | ffadc63799c2f95dffd081fe911bcbbce37e53ec (patch) | |
tree | 6d6158945909a6d5e8e2f0dbace3bb566878d3f1 /MdePkg/Library | |
parent | 0d622b28c35d7c044fb3c47017b72f603c466757 (diff) | |
download | edk2-ffadc63799c2f95dffd081fe911bcbbce37e53ec.zip edk2-ffadc63799c2f95dffd081fe911bcbbce37e53ec.tar.gz edk2-ffadc63799c2f95dffd081fe911bcbbce37e53ec.tar.bz2 |
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
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/BaseMemoryLib/MemLibGeneric.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c index 845016d..1e3c4c3 100644 --- a/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c +++ b/MdePkg/Library/BaseMemoryLib/MemLibGeneric.c @@ -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;
|