Skip to content

Commit daade74

Browse files
committed
Fix comparison if Serial is not of HardwareSerial type
Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 342dab6 commit daade74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/HardwareSerial.cpp

+1-1
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)