]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/MetaFileParser.py
BaseTools: Fixed the build fail issue for cases
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / MetaFileParser.py
index 4bd52619a9c5a86cb6b5499a57fb2dbe7b4d0be2..eaedba0c121e0b938faa8c084631101e1ad729a3 100644 (file)
@@ -1203,7 +1203,7 @@ class DscParser(MetaFileParser):
                 return\r
         TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT, 1)\r
         self._CurrentPcdName = TokenList[0]\r
-        if TokenList[1].strip().startswith("{CODE"):\r
+        if len(TokenList) == 2 and TokenList[1].strip().startswith("{CODE"):\r
             self._PcdDataTypeCODE = True\r
             self._PcdCodeValue = TokenList[1].strip()\r
 \r