Skip to content
New issue

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

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

Already on GitHub? # to your account

fix decoding lists of TRUE values #122

Merged
merged 3 commits into from
Apr 26, 2022
Merged

Conversation

achille-roussel
Copy link
Contributor

This is a fix for an undocumented edge case in the thrift protocol where collections of boolean values that are all true are sometimes encoded with the TRUE type instead of BOOL.

Comment on lines +433 to +438
i *= 64
for (mask & 1) != 0 {
mask >>= 1
i++
}
field := &dec.fields[i]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a fix for another bug: the error was reporting the wrong field ID.

Copy link
Contributor

Choose a reason for hiding this comment

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

Worth amending the commit or nah

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we're fine, this code is going to live on Github "forever", the context is here.

@achille-roussel achille-roussel merged commit a1e4c6b into master Apr 26, 2022
@achille-roussel achille-roussel deleted the fix-decoding-list-of-true branch April 26, 2022 17:42
@achille-roussel
Copy link
Contributor Author

Thanks for the review!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants