summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-11 11:01:50 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-12-11 11:01:50 +0000
commit7b9b2b920e7e11de3b7d4c2b3c305aa4a41225ba (patch)
tree478ba6361e649d08d0c76ae2fe09f419dbd10f67
parent351615ee5ee9b7f7255c6b2075efd31854070619 (diff)
downloadedk2-platforms-7b9b2b920e7e11de3b7d4c2b3c305aa4a41225ba.tar.xz
Fix the bug for evaluate EFI_IFR_NOT_EQUAL_OP opcode, and the bug in using UnicodeSPrint function.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9554 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Expression.c2
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
index 508a80524a..4bb1950668 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c
@@ -1941,7 +1941,7 @@ EvaluateExpression (
break;
case EFI_IFR_NOT_EQUAL_OP:
- Value->Value.b = (BOOLEAN) ((Result == 0) ? TRUE : FALSE);
+ Value->Value.b = (BOOLEAN) ((Result != 0) ? TRUE : FALSE);
break;
case EFI_IFR_GREATER_EQUAL_OP:
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
index 3e7979f733..8b72d8fb03 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/InputHandler.c
@@ -455,12 +455,12 @@ TheKey2:
//
// Year
//
- UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%04d", EditValue);
+ UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%04d", (UINT16) EditValue);
} else {
//
// Month/Day
//
- UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%02d", EditValue);
+ UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%02d", (UINT8) EditValue);
}
if (MenuOption->Sequence == 0) {
@@ -469,7 +469,7 @@ TheKey2:
FormattedNumber[EraseLen - 1] = DATE_SEPARATOR;
}
} else if (Question->Operand == EFI_IFR_TIME_OP) {
- UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%02d", EditValue);
+ UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%02d", (UINT8) EditValue);
if (MenuOption->Sequence == 0) {
FormattedNumber[EraseLen - 2] = TIME_SEPARATOR;