Skip to content

Conversation

@kperryua
Copy link
Contributor

@kperryua kperryua commented Aug 6, 2024

Fixup from previous change here. Like the previous version of this code, we should immediately throw an error if we fail to decode any Double from the buffer. We'll evaluate if it's expected to be the "wrong" integer only if it succeeds.

The previous fix caused a preconditionFailure crash since we'd fall through to the validateNumber function for a valid syntax JSON number.

@kperryua kperryua requested a review from itingliu August 6, 2024 01:11
@kperryua kperryua changed the base branch from main to release/6.0 August 6, 2024 01:12
@kperryua kperryua marked this pull request as draft August 6, 2024 01:12
@kperryua kperryua changed the base branch from release/6.0 to main August 6, 2024 01:26
@kperryua kperryua marked this pull request as ready for review August 6, 2024 01:26
@kperryua
Copy link
Contributor Author

kperryua commented Aug 6, 2024

@swift-ci please test

@kperryua kperryua merged commit c67f24e into swiftlang:main Aug 6, 2024
kperryua added a commit to kperryua/swift-foundation that referenced this pull request Aug 6, 2024
…FiniteMagnitude as Int causes a crash) (swiftlang#827)

(cherry picked from commit c67f24e)
kperryua added a commit to kperryua/swift-foundation that referenced this pull request Aug 6, 2024
…FiniteMagnitude as Int causes a crash) (swiftlang#827)

(cherry picked from commit c67f24e)
kperryua added a commit that referenced this pull request Aug 6, 2024
…FiniteMagnitude as Int causes a crash) (#827) (#829)

(cherry picked from commit c67f24e)
cthielen pushed a commit to cthielen/swift-foundation that referenced this pull request Nov 8, 2024
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