diff --git a/pyproject.toml b/pyproject.toml index aecc93d..9ce10df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ cmake.source-dir = "." [project] name = "caterpillar" -version = "2.4.1" +version = "2.4.2" description="Library to pack and unpack structurized binary data." authors = [ diff --git a/src/caterpillar/__init__.py b/src/caterpillar/__init__.py index db85a65..186dfce 100644 --- a/src/caterpillar/__init__.py +++ b/src/caterpillar/__init__.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -__version__ = "2.4.1" +__version__ = "2.4.2" __release__ = None __author__ = "MatrixEditor" diff --git a/src/caterpillar/fields/common.py b/src/caterpillar/fields/common.py index 7bce38c..fb64d62 100644 --- a/src/caterpillar/fields/common.py +++ b/src/caterpillar/fields/common.py @@ -848,6 +848,7 @@ def unpack_single(self, context: _ContextLike) -> Any: if not value or value[0] == self._raw_pad[0]: break data.extend(value) + value = bytes(data) else: length = self.__size__(context) value: bytes = context[CTX_STREAM].read(length) diff --git a/src/ccaterpillar/pyproject.toml b/src/ccaterpillar/pyproject.toml index 6d10da6..d39bb5d 100644 --- a/src/ccaterpillar/pyproject.toml +++ b/src/ccaterpillar/pyproject.toml @@ -18,7 +18,7 @@ CP_ENABLE_NATIVE = "1" [project] name = "caterpillar" -version = "2.4.1" +version = "2.4.2" description="Library to pack and unpack structurized binary data." authors = [