Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f05454e

Browse files
committedDec 20, 2018
Fix comparison if Serial is not of HardwareSerial type
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent b9b3ae4 commit f05454e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎cores/arduino/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ HardwareSerial::HardwareSerial(void* peripheral)
166166
// If Serial is defined in variant set
167167
// the Rx/Tx pins for com port if defined
168168
#if defined(Serial) && defined(PIN_SERIAL_RX) && defined(PIN_SERIAL_TX)
169-
if (this == &Serial) {
169+
if ((void*)this == (void*)&Serial) {
170170
setRx(PIN_SERIAL_RX);
171171
setTx(PIN_SERIAL_TX);
172172
} else

0 commit comments

Comments
 (0)
Please sign in to comment.