X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiMemoryLib%2FScanMem8Wrapper.c;h=ecf1bdd2a75dd26aca772a95d7a6a2887107d696;hp=9efca5e02a40f5621b30ca314d511acd40e20541;hb=56385d49874f4b7cee6c9a0652c6b7c10aff0e2f;hpb=14e436f9b09c796c4567929984ac7ce5300efb21 diff --git a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c index 9efca5e02a..ecf1bdd2a7 100644 --- a/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c +++ b/MdePkg/Library/UefiMemoryLib/ScanMem8Wrapper.c @@ -29,7 +29,7 @@ Scans a target buffer for an 8-bit value, and returns a pointer to the matching 8-bit value in the target buffer. - This function searches target the buffer specified by Buffer and Length from the lowest + This function searches the target buffer specified by Buffer and Length from the lowest address to the highest address for an 8-bit value that matches Value. If a match is found, then a pointer to the matching byte in the target buffer is returned. If no match is found, then NULL is returned. If Length is 0, then NULL is returned. @@ -65,7 +65,7 @@ ScanMem8 ( Scans a target buffer for a UINTN sized value, and returns a pointer to the matching UINTN sized value in the target buffer. - This function searches target the buffer specified by Buffer and Length from the lowest + This function searches the target buffer specified by Buffer and Length from the lowest address to the highest address for a UINTN sized value that matches Value. If a match is found, then a pointer to the matching byte in the target buffer is returned. If no match is found, then NULL is returned. If Length is 0, then NULL is returned. @@ -92,7 +92,8 @@ ScanMemN ( { if (sizeof (UINTN) == sizeof (UINT64)) { return ScanMem64 (Buffer, Length, (UINT64)Value); + } else { + return ScanMem32 (Buffer, Length, (UINT32)Value); } - return ScanMem32 (Buffer, Length, (UINT32)Value); }