summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorFeng, YunhuaX </o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1>2018-03-09 16:46:00 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-03-09 17:34:10 +0800
commitb31501c90abcea74c03e86a3bd9f6190cb4e1ddd (patch)
treeaa4150140b1828a70d57a556a31abba7399c625b /BaseTools/Source/Python
parent705ed563de86475a32fb555d4238cc10717294f8 (diff)
downloadedk2-b31501c90abcea74c03e86a3bd9f6190cb4e1ddd.tar.gz
edk2-b31501c90abcea74c03e86a3bd9f6190cb4e1ddd.tar.bz2
edk2-b31501c90abcea74c03e86a3bd9f6190cb4e1ddd.zip
BaseTools: Fix parse OFFSET_OF get wrong offset
Fix parse OFFSET_OF get wrong offset Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 79dc83efc3..e76f09c367 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -909,8 +909,9 @@ class ValueExpressionEx(ValueExpression):
LabelOffset = 0
for Index, Item in enumerate(PcdValueList):
# compute byte offset of every LABEL
- Item = Item.strip()
LabelList = ReLabel.findall(Item)
+ Item = ReLabel.sub('', Item)
+ Item = Item.strip()
if LabelList:
for Label in LabelList:
if not IsValidCString(Label):