XTLDR Rewrite #7
@ -528,21 +528,8 @@ BlDisplayInputDialog(IN PWCHAR Caption,
|
||||
}
|
||||
else if(Key.UnicodeChar == 0x0D)
|
||||
{
|
||||
/* ENTER key pressed, allocate memory for updated input text */
|
||||
BufferLength = RtlWideStringLength(InputFieldBuffer, 0);
|
||||
BlMemoryFreePool(*InputFieldText);
|
||||
Status = BlMemoryAllocatePool(BufferLength * sizeof(WCHAR), (PVOID *)*InputFieldText);
|
||||
if(Status != STATUS_EFI_SUCCESS)
|
||||
{
|
||||
/* Failed to allocate memory, print error message and return status code */
|
||||
BlDebugPrint(L"ERROR: Memory allocation failure (Status Code: 0x%lx)\n", Status);
|
||||
BlDisplayErrorDialog(L"XTLDR", L"Failed to save input data.");
|
||||
break;
|
||||
}
|
||||
|
||||
/* Copy edit buffer into original buffer */
|
||||
RtlZeroMemory(InputFieldText, BufferLength * sizeof(WCHAR));
|
||||
RtlCopyMemory(*InputFieldText, InputFieldBuffer, BufferLength * sizeof(WCHAR));
|
||||
/* ENTER key pressed, update input buffer */
|
||||
*InputFieldText = InputFieldBuffer;
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user