Fix two issues:
1. The default with of hex value is 0 according to MdeLib spec. If we expect it to be 16, we need to state it in the format string explicitly. 2. For UnicodeSPrint, the output buffer size of 0 will not print anything to the buffer according to MdeLib spec. We need to specify the maximum possible buffer size. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4635 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -440,11 +440,11 @@ EisaIdToText (
|
|||||||
//
|
//
|
||||||
//UnicodeSPrint ("%X", 0x0a03) => "0000000000000A03"
|
//UnicodeSPrint ("%X", 0x0a03) => "0000000000000A03"
|
||||||
//
|
//
|
||||||
UnicodeSPrint (PnpIdStr, 17 * 2, L"%X", EisaId >> 16);
|
UnicodeSPrint (PnpIdStr, 17 * 2, L"%16X", EisaId >> 16);
|
||||||
|
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
Text,
|
Text,
|
||||||
0,
|
sizeof (CHAR16) + sizeof (CHAR16) + sizeof (CHAR16) + sizeof (PnpIdStr),
|
||||||
L"%c%c%c%s",
|
L"%c%c%c%s",
|
||||||
'@' + ((EisaId >> 10) & 0x1f),
|
'@' + ((EisaId >> 10) & 0x1f),
|
||||||
'@' + ((EisaId >> 5) & 0x1f),
|
'@' + ((EisaId >> 5) & 0x1f),
|
||||||
|
Reference in New Issue
Block a user