Fix bug in SEQUENCE/SET OF handling
authorkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 20 Jan 2005 11:56:33 +0000 (11:56 +0000)
committerkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 20 Jan 2005 11:56:33 +0000 (11:56 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13137 f5534014-38df-0310-8fa8-9805f1628bb7

tools/asn2eth.py

index cb405d38dccbceabe3503465f072f4887b17b992..980e491dd845e9031b50161ef2f22b07d77ab60c 100644 (file)
@@ -1970,10 +1970,12 @@ class SequenceOfType (SqType):
     self.val.eth_reg(itmnm, ectx, idx='[##]', parent=ident)
 
   def eth_tname(self):
+    if self.val.type != 'Type_Ref':
+      return '#' + self.type + '_' + str(id(self))
     if not self.HasConstraint():
-      return "SEQUNCE_OF_" + self.val.eth_tname()
+      return "SEQUENCE_OF_" + self.val.eth_tname()
     elif self.constr.IsSize():
-      return 'SEQUNCE_' + self.constr.eth_constrname() + '_OF_' + self.val.eth_tname()
+      return 'SEQUENCE_' + self.constr.eth_constrname() + '_OF_' + self.val.eth_tname()
     else:
       return '#' + self.type + '_' + str(id(self))
 
@@ -2045,6 +2047,8 @@ class SetOfType (SqType):
     self.val.eth_reg(itmnm, ectx, idx='(##)', parent=ident)
 
   def eth_tname(self):
+    if self.val.type != 'Type_Ref':
+      return '#' + self.type + '_' + str(id(self))
     if not self.HasConstraint():
       return "SET_OF_" + self.val.eth_tname()
     elif self.constr.IsSize():