From b273a6c831c44fd077f050580254da82bf095195 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 19 Aug 2020 16:26:26 +0200 Subject: [PATCH] reverse length check --- armsrc/iso15693.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armsrc/iso15693.c b/armsrc/iso15693.c index 8e01c9555..428cf80ff 100644 --- a/armsrc/iso15693.c +++ b/armsrc/iso15693.c @@ -515,7 +515,7 @@ static RAMFUNC int Handle15693SamplesFromTag(uint16_t amplitude, DecodeTag_t *ta tag->output[tag->len] = tag->shiftReg; tag->len++; - if (tag->len >= tag->max_len) { + if (tag->len > tag->max_len) { // buffer overflow, give up LED_C_OFF(); return true; @@ -540,7 +540,7 @@ static RAMFUNC int Handle15693SamplesFromTag(uint16_t amplitude, DecodeTag_t *ta tag->output[tag->len] = tag->shiftReg; tag->len++; - if (tag->len >= tag->max_len) { + if (tag->len > tag->max_len) { // buffer overflow, give up tag->posCount = 0; tag->previous_amplitude = amplitude;