For orderedlist question, the value is stored in a buffer,
not in HiiValue. So when need to get default value from callback
function for orderedlist, need to pass the buffer.
This patch is to enhance this logic.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
EFI_BROWSER_ACTION_REQUEST ActionRequest;\r
INTN Action;\r
CHAR16 *NewString;\r
+ EFI_IFR_TYPE_VALUE *TypeValue;\r
\r
Status = EFI_NOT_FOUND;\r
StrValue = NULL;\r
// 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority)\r
//\r
HiiValue = &Question->HiiValue;\r
+ TypeValue = &HiiValue->Value;\r
+ if (HiiValue->Type == EFI_IFR_TYPE_BUFFER && Question->BufferValue != NULL) {\r
+ //\r
+ // For orderedlist, need to pass the BufferValue to Callback function.\r
+ //\r
+ TypeValue = (EFI_IFR_TYPE_VALUE *) Question->BufferValue;\r
+ }\r
\r
//\r
// Get Question defaut value from call back function.\r
Action,\r
Question->QuestionId,\r
HiiValue->Type,\r
- &HiiValue->Value,\r
+ TypeValue,\r
&ActionRequest\r
);\r
if (!EFI_ERROR (Status)) {\r