From 0537f332c968e6c3adeefa2222b5f1aa7252b711 Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Sat, 3 Mar 2018 09:12:18 +0800 Subject: BaseTools: DSC Components section support flexible PCD DSC Components section support flexible PCD, and for binary driver, we need patch this value. Update the split char ',' not ', ' because some value may have space, while others may not have this space. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py') diff --git a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py index 882da81930..942ba88d20 100644 --- a/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py +++ b/BaseTools/Source/Python/PatchPcdValue/PatchPcdValue.py @@ -161,10 +161,11 @@ def PatchBinaryFile(FileName, ValueOffset, TypeName, ValueString, MaxSize=0): # # Patch {0x1, 0x2, ...} byte by byte # - ValueList = ValueString[1 : len(ValueString) - 1].split(', ') + ValueList = ValueString[1 : len(ValueString) - 1].split(',') Index = 0 try: for ByteString in ValueList: + ByteString = ByteString.strip() if ByteString.upper().startswith('0X'): ByteValue = int(ByteString, 16) else: -- cgit v1.2.3