diff --git a/tasmota/xdrv_05_irremote.ino b/tasmota/xdrv_05_irremote.ino index f9a5b85d6..a4bc90fb9 100644 --- a/tasmota/xdrv_05_irremote.ino +++ b/tasmota/xdrv_05_irremote.ino @@ -278,7 +278,7 @@ void IrReceiveCheck(void) prev_number = true; } ir_high = !ir_high; - if (ResponseLength() > ResponseSize()) - 40) { break; } // Quit if char string becomes too long + if (ResponseLength() + 40 > ResponseSize()) { break; } // Quit if char string becomes too long } uint16_t extended_length = getCorrectedRawLength(&results); ResponseAppend_P(PSTR("\",\"" D_JSON_IR_RAWDATA "Info\":[%d,%d,%d]"), extended_length, i -1, results.overflow); diff --git a/tasmota/xdrv_05_irremote_full.ino b/tasmota/xdrv_05_irremote_full.ino index c570f991d..293170b66 100644 --- a/tasmota/xdrv_05_irremote_full.ino +++ b/tasmota/xdrv_05_irremote_full.ino @@ -307,7 +307,7 @@ void IrReceiveCheck(void) prev_number = true; } ir_high = !ir_high; - if (ResponseLength() > ResponseSize()) - 40) { break; } // Quit if char string becomes too long + if (ResponseLength() + 40 > ResponseSize()) { break; } // Quit if char string becomes too long } uint16_t extended_length = getCorrectedRawLength(&results); ResponseAppend_P(PSTR("\",\"" D_JSON_IR_RAWDATA "Info\":[%d,%d,%d]"), extended_length, i -1, results.overflow);