EDK2: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
DSC file have been fixed; fix typos
m UefiMain.c didn't compile. Added ; after line 17. There was also to fee bytes allocated as str2 is L-string.
Line 144: Line 144:
// Allocate a string
// Allocate a string
CHAR16* str = NULL;
CHAR16* str = NULL;
gBS->AllocatePool(EfiLoaderData, 20, (VOID**)&str);
gBS->AllocatePool(EfiLoaderData, 36, (VOID**)&str);
// Copy over a string
// Copy over a string
CHAR16* str2 = L"Allocated string\r\n"
CHAR16* str2 = L"Allocated string\r\n";
gBS->CopyMem((VOID*)str, (VOID*)str2, 20);
gBS->CopyMem((VOID*)str, (VOID*)str2, 36);
Print(str);
Print(str);
gBS->FreePool(str);
gBS->FreePool(str);