Closed positron96 closed 3 years ago
https://github.com/arduino/ArduinoCore-API/blob/173e8eadced2ad32eeb93bcbd5c49f8d6a055ea6/api/Common.h#L68
Current version does not wrap arguments in "()", so it works incorrectly when used like this:
bitWrite(var, bit, cond?1:0);
Some cores probably copied this header, as seen in stm32 and esp32
Hi @positron96 , thanks for spotting this! would you mind submitting a PR with the fix so we can give the proper attribution?
https://github.com/arduino/ArduinoCore-API/blob/173e8eadced2ad32eeb93bcbd5c49f8d6a055ea6/api/Common.h#L68
Current version does not wrap arguments in "()", so it works incorrectly when used like this:
Some cores probably copied this header, as seen in stm32 and esp32