diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-20 08:12:38 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-04-20 08:12:38 +0000 |
commit | 6412128af3f7a7e118605109713edf2f3dae3bd6 (patch) | |
tree | 3111be7ee1a5e165b06654ebf0c0b180ed2eb0fb /MdeModulePkg/Library/UefiHiiLib | |
parent | 2fd618df9dff28e18b553a6e5027470fe58eb61d (diff) | |
download | edk2-6412128af3f7a7e118605109713edf2f3dae3bd6.zip edk2-6412128af3f7a7e118605109713edf2f3dae3bd6.tar.gz edk2-6412128af3f7a7e118605109713edf2f3dae3bd6.tar.bz2 |
Enhance HiiGetBrowserData API to support the case that storage element is 0.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8135 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/UefiHiiLib')
-rw-r--r-- | MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c index d36828a..ea3c223 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -564,6 +564,15 @@ InternalHiiBrowserCallback ( VariableGuid,
VariableName
);
+
+ if (!EFI_ERROR (Status)) {
+ //
+ // No Resluts Data, only allocate one char for '\0'
+ //
+ ResultsData = AllocateZeroPool (sizeof (CHAR16));
+ return ResultsData;
+ }
+
if (Status != EFI_BUFFER_TOO_SMALL) {
return NULL;
}
|