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()