From 4c29d43304de904175ffa3b771533f0dd93beff9 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Sat, 8 Jul 2006 15:21:21 +0000 Subject: fix a bug in Service.c git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@841 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Universal/PCD/Dxe/Service.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'EdkModulePkg/Universal/PCD') diff --git a/EdkModulePkg/Universal/PCD/Dxe/Service.c b/EdkModulePkg/Universal/PCD/Dxe/Service.c index a2706d0bd3..1a377fe763 100644 --- a/EdkModulePkg/Universal/PCD/Dxe/Service.c +++ b/EdkModulePkg/Universal/PCD/Dxe/Service.c @@ -124,7 +124,7 @@ GetWorker ( // It is a pointer type. So get the MaxSize reserved for // this PCD entry. // - GetPtrTypeSize (TokenNumber, &GetSize); + GetPtrTypeSize (TmpTokenNumber, &GetSize); } CopyMem (VaraiableDefaultBuffer, Data + VariableHead->Offset, GetSize); FreePool (Data); @@ -630,7 +630,7 @@ SetWorker ( return EFI_INVALID_PARAMETER; case PCD_TYPE_STRING: - if (SetPtrTypeSize (TokenNumber, Size)) { + if (SetPtrTypeSize (TmpTokenNumber, Size)) { CopyMem (&StringTable[*((UINT16 *)InternalData)], Data, *Size); return EFI_SUCCESS; } else { @@ -639,7 +639,7 @@ SetWorker ( case PCD_TYPE_HII: if (PtrType) { - if (!SetPtrTypeSize (TokenNumber, Size)) { + if (!SetPtrTypeSize (TmpTokenNumber, Size)) { return EFI_INVALID_PARAMETER; } } @@ -662,13 +662,9 @@ SetWorker ( return Status; } - // - // Bug Bug: Please implement this - // - case PCD_TYPE_DATA: if (PtrType) { - if (SetPtrTypeSize (TokenNumber, Size)) { + if (SetPtrTypeSize (TmpTokenNumber, Size)) { CopyMem (InternalData, Data, *Size); return EFI_SUCCESS; } else { -- cgit v1.2.3