Skip to content

Commit

Permalink
Merge pull request #26 from MatrixEditor/fix/cstring-parsing
Browse files Browse the repository at this point in the history
[FIX] Fix greedy parsing of CStrings
  • Loading branch information
MatrixEditor authored Feb 14, 2025
2 parents f901a47 + b3432e7 commit 4c9bf3f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/caterpillar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

__version__ = "2.4.1"
__version__ = "2.4.2"
__release__ = None
__author__ = "MatrixEditor"

Expand Down
1 change: 1 addition & 0 deletions src/caterpillar/fields/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ccaterpillar/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 4c9bf3f

Please sign in to comment.