diff options
author | Eric Dong <eric.dong@intel.com> | 2014-04-11 06:15:57 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-04-11 06:15:57 +0000 |
commit | 061d5462249664ba32d87803365c3355614b35b8 (patch) | |
tree | 4d80941054ed6d8f5be15811cdc50f0d68a5e22a /MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | |
parent | 66a5771e7a6de31841f68fa7ac9545846d6d382a (diff) | |
download | edk2-platforms-061d5462249664ba32d87803365c3355614b35b8.tar.xz |
Sync value for string opcode after call the Callback function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15448 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 35bd04b16b..d7536e7ba5 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2993,6 +2993,7 @@ GetQuestionDefault ( EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
EFI_BROWSER_ACTION_REQUEST ActionRequest;
INTN Action;
+ CHAR16 *NewString;
Status = EFI_NOT_FOUND;
StrValue = NULL;
@@ -3030,6 +3031,19 @@ GetQuestionDefault ( &ActionRequest
);
if (!EFI_ERROR (Status)) {
+ if (HiiValue->Type == EFI_IFR_TYPE_STRING) {
+ NewString = GetToken (Question->HiiValue.Value.string, FormSet->HiiHandle);
+ ASSERT (NewString != NULL);
+
+ ASSERT (StrLen (NewString) * sizeof (CHAR16) <= Question->StorageWidth);
+ if (StrLen (NewString) * sizeof (CHAR16) <= Question->StorageWidth) {
+ CopyMem (Question->BufferValue, NewString, StrSize (NewString));
+ } else {
+ CopyMem (Question->BufferValue, NewString, Question->StorageWidth);
+ }
+
+ FreePool (NewString);
+ }
return Status;
}
}
@@ -3307,7 +3321,7 @@ ExtractDefault ( //
// Call the Retrieve call back to get the initial question value.
//
- Status = ProcessRetrieveForQuestion(FormSet->ConfigAccess, Question);
+ Status = ProcessRetrieveForQuestion(FormSet->ConfigAccess, Question, FormSet);
}
//
|