Skip to content

Commit

Permalink
reject negative autoboot timeout fix
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Lewiński <[email protected]>
  • Loading branch information
filipleple committed Oct 26, 2023
1 parent 43e6175 commit ccfd3da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#language fr-FR "<Spacebar>Bascule la Case de pointage"
#string NV_UPDATE_MESSAGE #language en-US "Configuration changed"
#language fr-FR "Configuration changed"
#string INPUT_ERROR_MESSAGE #language en-US "!!"
#language fr-FR "!!"
#string INPUT_ERROR_MESSAGE #language en-US "Invalid input value"
#language fr-FR "Invalid input value"
#string EMPTY_STRING #language en-US ""
#language fr-FR ""
#string ARE_YOU_SURE_YES #language en-US "Y"
Expand Down
7 changes: 6 additions & 1 deletion MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ GetNumericInput (
if ((Question->OpCode->OpCode == EFI_IFR_NUMERIC_OP) && (NumericOp != NULL)) {
if ((NumericOp->Flags & EFI_IFR_DISPLAY) == EFI_IFR_DISPLAY_UINT_HEX){
HexInput = TRUE;
} else if ((NumericOp->Flags & EFI_IFR_DISPLAY) == 0){
} else if ( ((NumericOp->Flags & EFI_IFR_DISPLAY) == 0) || ((NumericOp->Flags & EFI_IFR_DISPLAY) == EFI_IFR_DISPLAY_UINT_DEC) ){
//
// Display with EFI_IFR_DISPLAY_INT_DEC type. Support negative number.
//
Expand Down Expand Up @@ -752,6 +752,11 @@ GetNumericInput (
// In Manual input mode, check whether input the negative flag.
//
if (Key.UnicodeChar == '-') {
if ((NumericOp->Flags & EFI_IFR_DISPLAY) == EFI_IFR_DISPLAY_UINT_DEC){
if (Count == 0) UpdateStatusBar(INPUT_ERROR, TRUE);
break;
}

if (Negative) {
break;
}
Expand Down

0 comments on commit ccfd3da

Please sign in to comment.