Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite all fields when decoding, even if the value is null #21

Closed
Stebalien opened this issue Jun 19, 2020 · 1 comment · Fixed by #22
Closed

Overwrite all fields when decoding, even if the value is null #21

Stebalien opened this issue Jun 19, 2020 · 1 comment · Fixed by #22

Comments

@Stebalien
Copy link
Collaborator

Currently, if a value is null, we'll won't set the field in the struct to null. This means a re-used object could end up with merged state.

@Stebalien
Copy link
Collaborator Author

Alternatively, we could check to see if the struct is empty and refuse to decode into it if not?

Stebalien added a commit to Stebalien/cbor-gen that referenced this issue Jun 19, 2020
fixes whyrusleeping#21

We could also make sure every field write writes to the field, no matter what.
However, this is much safer.
Stebalien added a commit to Stebalien/cbor-gen that referenced this issue Jun 19, 2020
fixes whyrusleeping#21

We could also make sure every field write writes to the field, no matter what.
However, this is much safer.
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 a pull request may close this issue.

1 participant