mirror of https://github.com/acidanthera/audk.git
Enhance op-code EFI_IFR_TO_BOOLEAN to case insensitive.
Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12520 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
befbc4f3fb
commit
39099cbdcf
|
@ -2034,7 +2034,7 @@ EvaluateExpression (
|
|||
//
|
||||
// When converting from a string, if case-insensitive compare
|
||||
// with "true" is True, then push True. If a case-insensitive compare
|
||||
// with "false" is True, then push False.
|
||||
// with "false" is True, then push False. Otherwise, push Undefined.
|
||||
//
|
||||
StrPtr = GetToken (Value->Value.string, FormSet->HiiHandle);
|
||||
if (StrPtr == NULL) {
|
||||
|
@ -2042,10 +2042,15 @@ EvaluateExpression (
|
|||
goto Done;
|
||||
}
|
||||
|
||||
if ((StrCmp (StrPtr, L"true") == 0) || (StrCmp (StrPtr, L"false") == 0)){
|
||||
IfrStrToUpper (StrPtr);
|
||||
if (StrCmp (StrPtr, L"TRUE") == 0){
|
||||
Value->Value.b = TRUE;
|
||||
} else {
|
||||
} else if (StrCmp (StrPtr, L"FALSE") == 0) {
|
||||
Value->Value.b = FALSE;
|
||||
} else {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
FreePool (StrPtr);
|
||||
goto Done;
|
||||
}
|
||||
FreePool (StrPtr);
|
||||
Value->Type = EFI_IFR_TYPE_BOOLEAN;
|
||||
|
|
Loading…
Reference in New Issue