Fix SET statement bug which is always evaluated even it is in a False conditional statement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16620 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Yingke Liu 2015-01-19 05:04:28 +00:00 committed by yingke
parent b0e23cf32b
commit 2f04e52739
1 changed files with 2 additions and 0 deletions

View File

@ -715,6 +715,8 @@ class FdfParser:
self.__SetMacroValue(Macro, Value)
self.__WipeOffArea.append(((DefineLine, DefineOffset), (self.CurrentLineNumber - 1, self.CurrentOffsetWithinLine - 1)))
elif self.__Token == 'SET':
if not self.__GetIfListCurrentItemStat(IfList):
continue
SetLine = self.CurrentLineNumber - 1
SetOffset = self.CurrentOffsetWithinLine - len('SET')
PcdPair = self.__GetNextPcdName()