diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-15 20:43:47 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-10-16 14:45:29 +0800 |
commit | 0fab42ba27c207c0fe268a435704b949d79e7725 (patch) | |
tree | d34f2145db9909eaf0329aa46d1d04ce43946f2e /BaseTools/Source/Python/Workspace/DscBuildData.py | |
parent | 03c36c36a3aaa9e8a6975ebdec35a9533d947ef5 (diff) | |
download | edk2-0fab42ba27c207c0fe268a435704b949d79e7725.tar.gz edk2-0fab42ba27c207c0fe268a435704b949d79e7725.tar.bz2 edk2-0fab42ba27c207c0fe268a435704b949d79e7725.zip |
BaseTools: Fix bugs use special character in the --pcd option
Cases:
--pcd Token.Name="!"
--pcd Token.Name="\'W&\'"
--pcd Token.Name="2*h"
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DscBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index f41038e26d..7854e71db6 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1132,6 +1132,8 @@ class DscBuildData(PlatformBuildClassObject): if not FieldName:
if PcdDatumType not in TAB_PCD_NUMERIC_TYPES:
PcdValue = '"' + PcdValue + '"'
+ elif not PcdValue.isdigit() and not PcdValue.upper().startswith('0X'):
+ PcdValue = '"' + PcdValue + '"'
else:
IsArray = False
Base = 10
|