From: Zhu, Yonghong Date: Fri, 29 Dec 2017 00:28:17 +0000 (+0800) Subject: BaseTools: Fix the bug for QuarkPlatformPkg build failure X-Git-Tag: edk2-stable201903~2691 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=f13f306b3b07330191ba4620e49c2a9151b8e575 BaseTools: Fix the bug for QuarkPlatformPkg build failure The issue is that the string 'LPC' starts with the 'L' character and this is being confused with L" or L' for a Unicode string or Unicode character. Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=831 Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 953a412e80..55fa06d414 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -164,7 +164,7 @@ class ValueExpression(object): else: Oprand1,Size = ParseFieldValue('"' + Oprand1 + '"') if type(Oprand2) == type(''): - if Oprand2[0] in ['"', "'", 'L'] or Oprand2.startswith('UINT'): + if Oprand2[0] in ['"', "'"] or Oprand2.startswith('L"') or Oprand2.startswith("L'") or Oprand2.startswith('UINT'): Oprand2, Size = ParseFieldValue(Oprand2) else: Oprand2, Size = ParseFieldValue('"' + Oprand2 + '"')