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

Always check read_len's remaining length in structs #176

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

rooooooooob
Copy link
Collaborator

Fixes #171

@rooooooooob
Copy link
Collaborator Author

While this fixes #171 we still have the issue in #175 remaining. It is only an issue when you have overlapping variants AND they are inlined. When they're merely overlapping (e.g. shelley vs alonzo tx outs) this PR fixes the issue. When they were never overlapping (regardless of if inlined) then there was never an issue in the first place.


#[test]
fn overlapping_inlined() {
// this test won't work until https://github.com/dcSpark/cddl-codegen/issues/175 is resolved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we say sth about this limitation in the docs as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pretty niche limitation. I thought we agreed we'd use github issues instead of the readme to cover exactly things like this anyway?

@gostkin gostkin merged commit 4ae9ac7 into master Apr 25, 2023
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.

read_len.finish()? missing in some structs (fixed-length array structs?)
2 participants