summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2010-11-25 07:04:04 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2010-11-25 07:04:04 +0000
commit5c0337668f8bc7a2ea202d4a2bb9457d9a67160a (patch)
tree24d7c4302e597852640c72220bedae33b6b281ea
parent963b62ee23ea9c323291cf55bbbfe895042586fa (diff)
downloadedk2-platforms-5c0337668f8bc7a2ea202d4a2bb9457d9a67160a.tar.xz
Fix a bug in GetLangFromSupportedLangCodes()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11091 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c5
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index b0644d6040..e0cd873f96 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -523,6 +523,11 @@ GetLangFromSupportedLangCodes (
return CopyMem (mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength);
}
SubIndex++;
+
+ //
+ // Skip ';' characters in Supported
+ //
+ for (; *Supported != '\0' && *Supported == ';'; Supported++);
}
}
}
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index 3431844472..8123338112 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -1199,6 +1199,11 @@ GetLangFromSupportedLangCodes (
return CopyMem (mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength);
}
SubIndex++;
+
+ //
+ // Skip ';' characters in Supported
+ //
+ for (; *Supported != '\0' && *Supported == ';'; Supported++);
}
}
}