diff options
author | Bob Feng <bob.c.feng@intel.com> | 2015-07-06 00:55:15 +0000 |
---|---|---|
committer | bobfeng <bobfeng@Edk2> | 2015-07-06 00:55:15 +0000 |
commit | 0b5203bd84130947f8971db059cad7380f8debed (patch) | |
tree | 30ab7d8775cb13817161f107a01d1bf725537d38 | |
parent | a5e28cc1d03d762b5c87b08da9e614022dea5eb2 (diff) | |
download | edk2-platforms-0b5203bd84130947f8971db059cad7380f8debed.tar.xz |
BaseTools/Build: Fix the range expression evaluation error.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Bob Feng" <bob.c.feng@intel.com>
Reviewed-by: "Chen, Hesheng" <hesheng.chen@intel.com>
Reviewed-by: "Liu, Yingke D" <yingke.d.liu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17822 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | BaseTools/Source/Python/Common/RangeExpression.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/Source/Python/Common/RangeExpression.py index 5da4a476f4..b6c929fd88 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -263,28 +263,28 @@ class RangeExpression(object): rangeContainer = RangeContainer()
for range1 in rangeContainer1.pop():
for range2 in rangeContainer2.pop():
- if range1.start >= range2.start:
- start = range1.start
- end = range1.end
- range1.start = range2.start
- range1.end = range2.end
- range2.start = start
- range2.end = end
+ start1 = range1.start
+ end1 = range1.end
+ start2 = range2.start
+ end2 = range2.end
+ if start1 >= start2:
+ start1, start2 = start2, start1
+ end1, end2 = end2, end1
if range1.empty:
rangeid = str(uuid.uuid1())
rangeContainer.push(RangeObject(0, 0, True))
- if range1.end < range2.start:
+ if end1 < start2:
rangeid = str(uuid.uuid1())
rangeContainer.push(RangeObject(0, 0, True))
- elif range1.end == range2.start:
+ elif end1 == start2:
rangeid = str(uuid.uuid1())
- rangeContainer.push(RangeObject(range1.end, range1.end))
- elif range1.end <= range2.end and range1.end > range2.start:
+ rangeContainer.push(RangeObject(end1, end1))
+ elif end1 <= end2 and end1 > start2:
rangeid = str(uuid.uuid1())
- rangeContainer.push(RangeObject(range2.start, range1.end))
- elif range1.end >= range2.end:
+ rangeContainer.push(RangeObject(start2, end1))
+ elif end1 >= end2:
rangeid = str(uuid.uuid1())
- rangeContainer.push(RangeObject(range2.start, range2.end))
+ rangeContainer.push(RangeObject(start2, end2))
self.operanddict[rangeid] = rangeContainer
# rangeContainer.dump()
|