SecondEntry = TRUE;\r
} else if (Status == EFI_NOT_READY) {\r
Error:\r
- if (Packet != NULL) {\r
+ if (Packet != NULL && Packet->String != NULL) {\r
//\r
// Upon error, we will likely receive a string to print out\r
// Display error popup\r
//\r
if (Confirmation) {\r
if (EFI_ERROR (Status)) {\r
- if (Packet->String == NULL) {\r
+ if (Packet == NULL || Packet->String == NULL) {\r
WidthOfString = GetStringWidth (gConfirmError);\r
ScreenSize = MAX (WidthOfString, GetStringWidth (gPressEnter)) / 2;\r
CreatePopUp (ScreenSize, 4, &NullCharacter, gConfirmError, gPressEnter, &NullCharacter);\r
//\r
default:\r
if ((StringPtr[0] == CHAR_NULL) && (Key.UnicodeChar != CHAR_BACKSPACE)) {\r
+ StringPtr[0] = Key.UnicodeChar;\r
+ StringPtr[1] = CHAR_NULL;\r
if (!Confirmation) {\r
- StrnCpy (StringPtr, &Key.UnicodeChar, 1);\r
- StrnCpy (TempString, &Key.UnicodeChar, 1);\r
+ TempString[0] = Key.UnicodeChar;\r
+ TempString[1] = CHAR_NULL;\r
} else {\r
- StrnCpy (StringPtr, &Key.UnicodeChar, 1);\r
- StrnCpy (TempString2, &Key.UnicodeChar, 1);\r
+ TempString2[0] = Key.UnicodeChar;\r
+ TempString2[1] = CHAR_NULL;\r
ConfirmationComplete = FALSE;\r
}\r
} else if ((GetStringWidth (StringPtr) / 2 <= (UINTN) (MenuOption->ThisTag->Maximum - 1) / 2) &&\r