Skip to content

fix: Coerce int32 values before writer sizing#2281

Merged
dcodeIO merged 1 commit into
masterfrom
patch/writer-coerce
May 22, 2026
Merged

fix: Coerce int32 values before writer sizing#2281
dcodeIO merged 1 commit into
masterfrom
patch/writer-coerce

Conversation

@dcodeIO

@dcodeIO dcodeIO commented May 22, 2026

Copy link
Copy Markdown
Member

Fixes an int32 writer edge case where invalid fractional input could be sized using the pre-coercion value but written using effectively coerced bits, producing inconsistent output. Also keeps 64-bit varint writer operations immutable while finishing.

Fixes #2098

@dcodeIO dcodeIO requested a review from alexander-fenster May 22, 2026 00:45
@dcodeIO dcodeIO merged commit 53c2e54 into master May 22, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request May 22, 2026
@dcodeIO dcodeIO deleted the patch/writer-coerce branch May 30, 2026 22:28
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.

Inconsistent result when writing negative float into int32

2 participants