summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index b357e29b3c..c36588e4bf 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -3897,6 +3897,7 @@ GetQuestionDefault (
EFI_BROWSER_ACTION_REQUEST ActionRequest;
INTN Action;
CHAR16 *NewString;
+ EFI_IFR_TYPE_VALUE *TypeValue;
Status = EFI_NOT_FOUND;
StrValue = NULL;
@@ -3917,6 +3918,13 @@ GetQuestionDefault (
// 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority)
//
HiiValue = &Question->HiiValue;
+ TypeValue = &HiiValue->Value;
+ if (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue != NULL) {
+ //
+ // For orderedlist, need to pass the BufferValue to Callback function.
+ //
+ TypeValue = (EFI_IFR_TYPE_VALUE *) Question->BufferValue;
+ }
//
// Get Question defaut value from call back function.
@@ -3930,7 +3938,7 @@ GetQuestionDefault (
Action,
Question->QuestionId,
HiiValue->Type,
- &HiiValue->Value,
+ TypeValue,
&ActionRequest
);
if (!EFI_ERROR (Status)) {