Skip to content

Conversation

@jcrist
Copy link
Owner

@jcrist jcrist commented Oct 20, 2024

Previously we'd truncate offset = len(buf) if offset > len(buf) when calling encode_into(msg, buf, offset). We now expand the size of buf to offset, providing a more consistent and expected behavior.

Fixes #697.

Previously we'd truncate `offset = len(buf)` if `offset > len(buf)` when
calling `encode_into(msg, buf, offset)`. We now expand the size of `buf`
to `offset`, providing a more consistent and expected behavior.
@jcrist jcrist merged commit c80616a into main Oct 20, 2024
7 checks passed
@jcrist jcrist deleted the encode-into-extend-offset branch October 20, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Encode_into might not write data at the intended offset location if buffer is too small.

1 participant