Fixing bug when modifying the name of a derived data type
authorlaurent
Fri, 18 Nov 2011 17:39:12 +0100
changeset 590 b2442bb10c0b
parent 589 e3a1d9a59c97
child 591 4d6719c51f05
Fixing bug when modifying the name of a derived data type
plcopen/plcopen.py
--- a/plcopen/plcopen.py	Fri Nov 18 17:37:43 2011 +0100
+++ b/plcopen/plcopen.py	Fri Nov 18 17:39:12 2011 +0100
@@ -1117,7 +1117,7 @@
         if self.content["name"] in ["derived", "array", "subrangeSigned", "subrangeUnsigned"]:
             self.content["value"].updateElementName(old_name, new_name)
         elif self.content["name"] == "struct":
-            for element in datatype_content["value"].getvariable():
+            for element in self.content["value"].getvariable():
                 element_type = element.type.updateElementName(old_name, new_name)
     setattr(cls, "updateElementName", updateElementName)