summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/DscBuildData.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-02-26 15:36:47 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-02-28 13:40:07 +0800
commitcdbf45ad859b1e75e055f1fd06d0c8a10452b3aa (patch)
treedcb110f7e8ad405497093bb1a751b56ae1127ec6 /BaseTools/Source/Python/Workspace/DscBuildData.py
parentdc9b2a57403262cf6df9d150ea3a118a7d765ad8 (diff)
downloadedk2-cdbf45ad859b1e75e055f1fd06d0c8a10452b3aa.tar.gz
edk2-cdbf45ad859b1e75e055f1fd06d0c8a10452b3aa.tar.bz2
edk2-cdbf45ad859b1e75e055f1fd06d0c8a10452b3aa.zip
BaseTools: Fix a bug override Pcd by DSC Components section
The case is: define a VOID* pcd in DEC file, eg: Value is {0x1}. then override this PCD on DSC component section, eg: Value is {0x1, 0x2, 0x3}, the max size of this PCD is calculate wrong which cause build error. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index ea8d1847f7..66402c52b7 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -679,8 +679,9 @@ class DscBuildData(PlatformBuildClassObject):
for TokenSpaceGuid, PcdCName, Setting, Dummy1, Dummy2, Dummy3, Dummy4,Dummy5 in RecordList:
TokenList = GetSplitValueList(Setting)
DefaultValue = TokenList[0]
- if len(TokenList) > 1:
- MaxDatumSize = TokenList[1]
+ # the format is PcdName| Value | VOID* | MaxDatumSize
+ if len(TokenList) > 2:
+ MaxDatumSize = TokenList[2]
else:
MaxDatumSize = ''
TypeString = self._PCD_TYPE_STRING_[Type]