Skip to content

Coerce integer-encoded CBOR values when reading float/double#1247

Merged
mtdowling merged 1 commit into
mainfrom
fix-cbor-double-decoding
Jun 16, 2026
Merged

Coerce integer-encoded CBOR values when reading float/double#1247
mtdowling merged 1 commit into
mainfrom
fix-cbor-double-decoding

Conversation

@mtdowling

Copy link
Copy Markdown
Member

readDouble rejected any token that wasn't FLOAT, so a whole-valued double or float encoded as a CBOR integer (e.g. 1.0 written as the major-type-0 integer 1) threw a SerializationException.

What behavior changes?

Describe the observable difference in behavior before and after this change.

Why is this change needed?

Explain the motivation: bug, feature request, refactor, performance, etc.

How was this validated?

List tests added, benchmarks run, or manual verification performed.

What should reviewers focus on?

Point reviewers to the files or sections that contain the interesting logic.

Additional Links

Related issues, design docs, or prior art.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mtdowling mtdowling enabled auto-merge (rebase) June 16, 2026 21:48
readDouble rejected any token that wasn't FLOAT, so a whole-valued
double or float encoded as a CBOR integer (e.g. 1.0 written as the
major-type-0 integer 1) threw a SerializationException.
@mtdowling mtdowling force-pushed the fix-cbor-double-decoding branch from 44f5915 to 2765966 Compare June 16, 2026 22:15
@mtdowling mtdowling requested a review from adwsingh June 16, 2026 22:16
@mtdowling mtdowling merged commit 975684b into main Jun 16, 2026
5 checks passed
@mtdowling mtdowling deleted the fix-cbor-double-decoding branch June 16, 2026 22:25
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.

2 participants