From 4c56f55266f874e9818c05d979a01c9b08290a39 Mon Sep 17 00:00:00 2001 From: citronneur Date: Wed, 4 Feb 2015 21:47:32 +0100 Subject: [PATCH] fix issue 14 --- rdpy/core/type.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rdpy/core/type.py b/rdpy/core/type.py index 8090814..9e2ea9f 100644 --- a/rdpy/core/type.py +++ b/rdpy/core/type.py @@ -498,6 +498,9 @@ class CompositeType(Type): @summary: Call sizeof on each sub type @return: sum of sizeof of each Type attributes """ + if not self._readLen is None: + return self._readLen.value + size = 0 for name in self._typeName: size += sizeof(self.__dict__[name])