From b63cb47bb47ae80ad573030536e447d43cfd9f5d Mon Sep 17 00:00:00 2001 From: MatrixEditor <58256046+MatrixEditor@users.noreply.github.com> Date: Fri, 14 Feb 2025 17:58:58 +0100 Subject: [PATCH 1/2] Fix issue #25 --- + Added missing line in CString.unpack_single to return the parsed string --- src/caterpillar/fields/common.py | 1 + 1 file changed, 1 insertion(+) 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) From b3432e7d061a03d6efa54bce42f885d566b18ce3 Mon Sep 17 00:00:00 2001 From: MatrixEditor <58256046+MatrixEditor@users.noreply.github.com> Date: Fri, 14 Feb 2025 18:01:09 +0100 Subject: [PATCH 2/2] Bump release version to 2.4.2 --- pyproject.toml | 2 +- src/caterpillar/__init__.py | 2 +- src/ccaterpillar/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/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 = [