Skip to content
This repository was archived by the owner on Sep 30, 2021. It is now read-only.

Fix reversed order of evaluation of args in call to LineFollow::config #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

j54n1n
Copy link

@j54n1n j54n1n commented Mar 11, 2017

In C/C++ the order of evaluation of function arguments is unspecified.

In the particular case it was assumed that the calls to messageIn.readByte() in LineFollow::config() are evaluated from left to right. But that is not the case. In fact the evaluation order is from right to left with avr-gcc. At the end that caused the line follower application to work improperly.

The problem is solved by using additional variables like in the other cases of calls to messageIn.readByte() or messageIn.readInt().

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

2 participants