]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the bug for QuarkPlatformPkg build failure
authorZhu, Yonghong <yonghong.zhu@intel.com>
Fri, 29 Dec 2017 00:28:17 +0000 (08:28 +0800)
committerLiming Gao <liming.gao@intel.com>
Fri, 29 Dec 2017 03:07:56 +0000 (11:07 +0800)
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 <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Common/Expression.py

index 953a412e806ee29f1be6c84d5d28f08c6b0a2c89..55fa06d414ea1029293ee1c92bc2ceb314e4d26f 100644 (file)
@@ -164,7 +164,7 @@ class ValueExpression(object):
                 else:\r
                     Oprand1,Size = ParseFieldValue('"' + Oprand1 + '"')\r
             if type(Oprand2) == type(''):\r
-                if Oprand2[0] in ['"', "'", 'L'] or Oprand2.startswith('UINT'):\r
+                if Oprand2[0] in ['"', "'"] or Oprand2.startswith('L"') or Oprand2.startswith("L'") or Oprand2.startswith('UINT'):\r
                     Oprand2, Size = ParseFieldValue(Oprand2)\r
                 else:\r
                     Oprand2, Size = ParseFieldValue('"' + Oprand2 + '"')\r