diff options
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/String.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c index 9850cba8e0..57b887d8a6 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c @@ -163,15 +163,13 @@ GetUnicodeStringTextOrSize ( )
{
UINTN StringSize;
- CHAR16 Zero;
UINT8 *StringPtr;
ASSERT (StringSrc != NULL && BufferSize != NULL);
- ZeroMem (&Zero, sizeof (CHAR16));
StringSize = sizeof (CHAR16);
StringPtr = StringSrc;
- while (CompareMem (StringPtr, &Zero, sizeof (CHAR16)) != 0) {
+ while (ReadUnaligned16 ((UINT16 *) StringPtr) != 0) {
StringSize += sizeof (CHAR16);
StringPtr += sizeof (CHAR16);
}
|