mirror of https://github.com/acidanthera/audk.git
BaseTools: Fix a bug for BOOLEAN type value in Asbuilt inf
When the PCD value is set to TRUE or FALSE, while it is not exchanged to its int value, it cause error in the function int(Pcd.DefaultValue, 0). Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
227fe49d5d
commit
7ced8bb49b
|
@ -3925,6 +3925,13 @@ class ModuleAutoGen(AutoGen):
|
|||
else:
|
||||
continue
|
||||
PcdValue = ''
|
||||
if Pcd.DatumType == 'BOOLEAN':
|
||||
BoolValue = Pcd.DefaultValue.upper()
|
||||
if BoolValue == 'TRUE':
|
||||
Pcd.DefaultValue = '1'
|
||||
elif BoolValue == 'FALSE':
|
||||
Pcd.DefaultValue = '0'
|
||||
|
||||
if Pcd.DatumType != 'VOID*':
|
||||
HexFormat = '0x%02x'
|
||||
if Pcd.DatumType == 'UINT16':
|
||||
|
|
Loading…
Reference in New Issue