From 2f04e527397f6e6646ca7a96436b5edb29d303e9 Mon Sep 17 00:00:00 2001 From: Yingke Liu Date: Mon, 19 Jan 2015 05:04:28 +0000 Subject: [PATCH] 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 Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16620 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/GenFds/FdfParser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index f4ccda9374..8091a51f35 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -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() -- 2.39.2