summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-31 05:44:48 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-31 05:44:48 +0000
commit2ef9435a77860fbb7f45dc5f115908c4b0bf9695 (patch)
treebc8b34acd281b21a340e93a23e9931089e6e61aa /MdeModulePkg
parent1f53f7bb991c4299695a7aac2420ccae1b5fab1c (diff)
downloadedk2-platforms-2ef9435a77860fbb7f45dc5f115908c4b0bf9695.tar.xz
Fix the bug that PCD driver treat StringTableIndex as UINT8 value but in fact it is UINT16 value.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8412 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/PCD/Dxe/Service.c2
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c
index 60080f13f7..dd0ff7e2c5 100644
--- a/MdeModulePkg/Universal/PCD/Dxe/Service.c
+++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c
@@ -161,7 +161,7 @@ GetWorker (
break;
case PCD_TYPE_STRING:
- StringTableIdx = (UINT16) *((UINT8 *) PcdDb + Offset);
+ StringTableIdx = *(UINT16*)((UINT8 *) PcdDb + Offset);
RetPtr = (VOID *) (StringTable + StringTableIdx);
break;
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c
index ff59b81dcd..200c0d4639 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.c
@@ -640,7 +640,7 @@ GetWorker (
return (VOID *) ((UINT8 *)PeiPcdDb + Offset);
case PCD_TYPE_STRING:
- StringTableIdx = (UINT16) *((UINT8 *) PeiPcdDb + Offset);
+ StringTableIdx = * (UINT16*) ((UINT8 *) PeiPcdDb + Offset);
return (VOID *) (&StringTable[StringTableIdx]);
default: