mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
351615ee5e
commit
7b9b2b920e
|
@ -1941,7 +1941,7 @@ EvaluateExpression (
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFI_IFR_NOT_EQUAL_OP:
|
case EFI_IFR_NOT_EQUAL_OP:
|
||||||
Value->Value.b = (BOOLEAN) ((Result == 0) ? TRUE : FALSE);
|
Value->Value.b = (BOOLEAN) ((Result != 0) ? TRUE : FALSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFI_IFR_GREATER_EQUAL_OP:
|
case EFI_IFR_GREATER_EQUAL_OP:
|
||||||
|
|
|
@ -455,12 +455,12 @@ TheKey2:
|
||||||
//
|
//
|
||||||
// Year
|
// Year
|
||||||
//
|
//
|
||||||
UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%04d", EditValue);
|
UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%04d", (UINT16) EditValue);
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// Month/Day
|
// Month/Day
|
||||||
//
|
//
|
||||||
UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%02d", EditValue);
|
UnicodeSPrint (FormattedNumber, 21 * sizeof (CHAR16), L"%02d", (UINT8) EditValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MenuOption->Sequence == 0) {
|
if (MenuOption->Sequence == 0) {
|
||||||
|
@ -469,7 +469,7 @@ TheKey2:
|
||||||
FormattedNumber[EraseLen - 1] = DATE_SEPARATOR;
|
FormattedNumber[EraseLen - 1] = DATE_SEPARATOR;
|
||||||
}
|
}
|
||||||
} else if (Question->Operand == EFI_IFR_TIME_OP) {
|
} 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) {
|
if (MenuOption->Sequence == 0) {
|
||||||
FormattedNumber[EraseLen - 2] = TIME_SEPARATOR;
|
FormattedNumber[EraseLen - 2] = TIME_SEPARATOR;
|
||||||
|
|
Loading…
Reference in New Issue