diff options
Diffstat (limited to 'MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c b/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c index ef499d18cf..0b12359f14 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c @@ -266,7 +266,7 @@ UpdateName ( for (Index = 0; Index < Snp->Mode->HwAddressSize; Index++) {
OffSet += UnicodeSPrint (
HandleName + OffSet,
- sizeof (HandleName) - OffSet,
+ sizeof (HandleName) - OffSet * sizeof (CHAR16),
L"%02X-",
Snp->Mode->CurrentAddress.Addr[Index]
);
@@ -276,8 +276,8 @@ UpdateName ( //
OffSet--;
OffSet += UnicodeSPrint (
- HandleName,
- sizeof (HandleName),
+ HandleName + OffSet,
+ sizeof (HandleName) - OffSet * sizeof (CHAR16),
L")"
);
if (gSimpleNetworkControllerNameTable != NULL) {
|