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

Type / Endianism problem in yang_parse_file #128

Closed
colinmhoward opened this issue Aug 19, 2020 · 3 comments
Closed

Type / Endianism problem in yang_parse_file #128

colinmhoward opened this issue Aug 19, 2020 · 3 comments
Labels

Comments

@colinmhoward
Copy link

I have had to cross compile your code onto a processor that is big endian. This causes an issue in the yang_parse_file function, as the read function reads characters into an int, so the character is actully contained in the highest byte of the integer, and then you mask it away as well with an & 0xff.

I have resolved and patched it by getting the read function to read a char instead of an int.

@olofhagsand
Copy link
Member

Thanks for detecting. Do you have a proposed patch for that?

@colinmhoward
Copy link
Author

colinmhoward commented Aug 20, 2020 via email

@olofhagsand
Copy link
Member

Fixed by patch ^

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

No branches or pull requests

2 participants