diff --git a/src/ESP32SJA1000.cpp b/src/ESP32SJA1000.cpp index 309e030..affdf2a 100644 --- a/src/ESP32SJA1000.cpp +++ b/src/ESP32SJA1000.cpp @@ -297,7 +297,7 @@ int ESP32SJA1000Class::filter(int id, int mask) int ESP32SJA1000Class::filterExtended(long id, long mask) { id &= 0x1FFFFFFF; - mask &= ~(mask & 0x1FFFFFFF); + mask = ~(mask & 0x1FFFFFFF); modifyRegister(REG_MOD, 0x17, 0x01); // reset