summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiLib/UefiLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/UefiLib/UefiLib.c')
-rw-r--r--MdePkg/Library/UefiLib/UefiLib.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/MdePkg/Library/UefiLib/UefiLib.c b/MdePkg/Library/UefiLib/UefiLib.c
index 1140854303..a2dd6a8c12 100644
--- a/MdePkg/Library/UefiLib/UefiLib.c
+++ b/MdePkg/Library/UefiLib/UefiLib.c
@@ -24,13 +24,20 @@
@retval FALSE Language 1 and language 2 are not the same.
**/
+STATIC
BOOLEAN
CompareIso639LanguageCode (
IN CONST CHAR8 *Language1,
IN CONST CHAR8 *Language2
)
{
- return (BOOLEAN) (ReadUnaligned24 ((CONST UINT32 *) Language1) == ReadUnaligned24 ((CONST UINT32 *) Language2));
+ UINT32 Name1;
+ UINT32 Name2;
+
+ Name1 = ReadUnaligned24 ((CONST UINT32 *) Language1);
+ Name2 = ReadUnaligned24 ((CONST UINT32 *) Language2);
+
+ return (BOOLEAN) (Name1 == Name2);
}
/**