Implementation for handling the User Interface option processing.\r
\r
\r
-Copyright (c) 2004 - 2009, Intel Corporation\r
+Copyright (c) 2004 - 2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
\r
**/\r
\r
-#include "Ui.h"\r
#include "Setup.h"\r
\r
\r
\r
switch (Question->Operand) {\r
case EFI_IFR_ORDERED_LIST_OP:\r
+ //\r
+ // Check whether there are Options of this OrderedList\r
+ //\r
+ if (IsListEmpty (&Question->OptionListHead)) {\r
+ break;\r
+ }\r
//\r
// Initialize Option value array\r
//\r
break;\r
\r
case EFI_IFR_ONE_OF_OP:\r
+ //\r
+ // Check whether there are Options of this OneOf\r
+ //\r
+ if (IsListEmpty (&Question->OptionListHead)) {\r
+ break;\r
+ }\r
if (Selected) {\r
//\r
// Go ask for input\r
\r
TempString = AllocateCopyPool ((Maximum + 1) * sizeof (CHAR16), Question->BufferValue);\r
ASSERT (TempString != NULL);\r
- \r
+\r
TempString[Maximum] = L'\0';\r
\r
if (StrCmp (StringPtr, TempString) != 0) {\r
UINTN *OldIndexArray;\r
\r
BlockWidth = (UINTN) gHelpBlockWidth - 1;\r
- \r
+\r
//\r
// every three elements of IndexArray form a screen-line of string:[ IndexArray[i*3], IndexArray[i*3+1] )\r
// IndexArray[i*3+2] stores the initial glyph width of single character. to save this is because we want\r
OldIndexArray = IndexArray;\r
IndexArray = AllocatePool (AllocateSize * sizeof (UINTN) * 3);\r
ASSERT (IndexArray != NULL);\r
- \r
+\r
CopyMem (IndexArray, OldIndexArray, LineCount * sizeof (UINTN) * 3);\r
FreePool (OldIndexArray);\r
}\r