diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-25 03:14:35 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-25 03:14:35 +0000 |
commit | 372285d1fc420da6c9da9f3a1856d16f37e557d4 (patch) | |
tree | cf75e4314a0eb0dee87db773df69954ddc13fce2 /MdeModulePkg/Universal/DevicePathDxe | |
parent | 0c0e0a041daab3600ed326a712437cc3a14afd33 (diff) | |
download | edk2-platforms-372285d1fc420da6c9da9f3a1856d16f37e557d4.tar.xz |
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
Diffstat (limited to 'MdeModulePkg/Universal/DevicePathDxe')
-rw-r--r-- | MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c index 78c95737a4..777c844578 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathToText.c @@ -440,11 +440,11 @@ EisaIdToText ( //
//UnicodeSPrint ("%X", 0x0a03) => "0000000000000A03"
//
- UnicodeSPrint (PnpIdStr, 17 * 2, L"%X", EisaId >> 16);
+ UnicodeSPrint (PnpIdStr, 17 * 2, L"%16X", EisaId >> 16);
UnicodeSPrint (
Text,
- 0,
+ sizeof (CHAR16) + sizeof (CHAR16) + sizeof (CHAR16) + sizeof (PnpIdStr),
L"%c%c%c%s",
'@' + ((EisaId >> 10) & 0x1f),
'@' + ((EisaId >> 5) & 0x1f),
|