XTLDR Rewrite #7

Merged
belliash merged 184 commits from xtldr_rewrite into master 2024-01-09 18:51:04 +01:00
Showing only changes of commit 3a0fd18211 - Show all commits

View File

@ -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