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

Conditional Fields issue ? #3

Open
srabouin opened this issue Oct 19, 2016 · 1 comment
Open

Conditional Fields issue ? #3

srabouin opened this issue Oct 19, 2016 · 1 comment

Comments

@srabouin
Copy link
Contributor

https://github.com/royale-proxy/cr-messages-python/blob/master/decoder.py#L90
I think this should have a read(1) to get rid of the 0 byte, otherwise it gets moved to the next field since it only peeks. I have used components instead with extensions id 0/1 to get rid of that byte. I am not 100% sure, hopefully someone can verify this theory. Is this used somewhere else correctly?

@123456abcdef
Copy link

123456abcdef commented Oct 25, 2016

I think this was working back then, when clugh released it. I think this part handels a special case if you have two optional fields back to back. In this case you won't have one boolean for each field, but both boolean merged together. Like 0b01 if first field exists, second not, or 0b11 if both fields exists (Example from CoC ). I'm not to sure anymore how exactly this was working and if CR has a similiar thing in their protocol.

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

No branches or pull requests

2 participants