Skip to content

Conversation

@jimwhitelaw
Copy link
Collaborator

Fixed the issue with incorrect values being returned from findResponse() even though the received bytes were correct. The bug was caused by bit shifting the uint8_t value returned by ctoi() by more than 8 bits (undefined behaviour). Fix is to cast the result of ctoi() to uint64_t before doing the left shift.

Also note in the issue #157, the sample code has a bug were the pids var is a signed int, which will cause an error; it should be unsigned. See example program Check_PIDs_1_20.ino for a working version.

@PowerBroker2
Copy link
Owner

Awesome. Also, thank you so much for helping me fix up the loose ends of this library!

@PowerBroker2 PowerBroker2 merged commit cfced0c into PowerBroker2:master Dec 17, 2023
@jimwhitelaw jimwhitelaw deleted the fix-issue-157 branch December 17, 2023 15:58
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.

2 participants