BaseTools: Fix the bug for display incorrect *M flag in report
The root cause is the byte array value in the driver Pcd, some bytes have additional space character, while the value in DSC file doesn't have this space, it cause the string compare return false, so we remove the extra space. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -836,9 +836,9 @@ def StringToArray(String):
|
|||||||
elif String.startswith('{'):
|
elif String.startswith('{'):
|
||||||
StringLen = len(String.split(","))
|
StringLen = len(String.split(","))
|
||||||
if StringLen % 2:
|
if StringLen % 2:
|
||||||
return "{%s, 0x00}" % ", ".join([ C for C in String[1:-1].split(',')])
|
return "{%s,0x00}" % ",".join([ C.strip() for C in String[1:-1].split(',')])
|
||||||
else:
|
else:
|
||||||
return "{%s}" % ", ".join([ C for C in String[1:-1].split(',')])
|
return "{%s}" % ",".join([ C.strip() for C in String[1:-1].split(',')])
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if len(String.split()) % 2:
|
if len(String.split()) % 2:
|
||||||
|
Reference in New Issue
Block a user