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

subtle recvRetNumber coding error #99

Open
sunnybank101 opened this issue Jan 16, 2021 · 0 comments
Open

subtle recvRetNumber coding error #99

sunnybank101 opened this issue Jan 16, 2021 · 0 comments

Comments

@sunnybank101
Copy link

V.Subtle error.... recvRetNumber(uint32_t *number, uint32_t timeout) function Line 67
*number = ((uint32_t)temp[4] << 24) | ((uint32_t)temp[3] << 16) | (temp[2] << 8) | (temp[1]);
should be
*number = ((uint32_t)temp[4] << 24) | ((uint32_t)temp[3] << 16) | ((uint32_t)temp[2] << 8) | (temp[1]);
<<8 on temp[2] can blow a uint8 as part of that calc

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

1 participant