]> Cypherpunks.ru repositories - pyderasn.git/blobdiff - pyderasn.py
Copy BitStrings tuple, do not reference it
[pyderasn.git] / pyderasn.py
index 833e785206f26a4f84ec209a793c8c797fba51cc..d14997bfe24d4569f7732bf238e812263aa92f89 100755 (executable)
@@ -1656,7 +1656,10 @@ class BitString(Obj):
 
     def copy(self):
         obj = self.__class__(_specs=self.specs)
 
     def copy(self):
         obj = self.__class__(_specs=self.specs)
-        obj._value = self._value
+        value = self._value
+        if value is not None:
+            value = (value[0], value[1])
+        obj._value = value
         obj.tag = self.tag
         obj._expl = self._expl
         obj.default = self.default
         obj.tag = self.tag
         obj._expl = self._expl
         obj.default = self.default