]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Code should not update the variable that save the raw data.
authorZhaozh1x <zhiqiangx.zhao@intel.com>
Tue, 11 Sep 2018 10:31:36 +0000 (18:31 +0800)
committerLiming Gao <liming.gao@intel.com>
Tue, 16 Oct 2018 00:59:50 +0000 (08:59 +0800)
Code should not update the value of variable which save the original
raw content of meta file.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Workspace/DscBuildData.py

index b7b4b610ca916c946a9e714f09227a1abe33cc6a..6106f8ee55dcd20c3fe9382d16d7689604db6f71 100644 (file)
@@ -1899,12 +1899,15 @@ class DscBuildData(PlatformBuildClassObject):
                     IsArray = IsFieldValueAnArray(FieldList[FieldName][0])\r
                     if IsArray:\r
                         try:\r
-                            FieldList[FieldName][0] = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)\r
+                            FieldValue = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)\r
                         except BadExpression:\r
                             EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " %\r
                                             (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))\r
                     try:\r
-                        Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])\r
+                        if IsArray:\r
+                            Value, ValueSize = ParseFieldValue (FieldValue)\r
+                        else:\r
+                            Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])\r
                     except Exception:\r
                         EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))\r
                     if isinstance(Value, str):\r