From 89db6064d063f91d3c7bfa29f7d11504ca3cf542 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sat, 9 Mar 2019 17:25:53 +0100 Subject: [PATCH] fix: 'lf paradox demod' - wrong check --- client/cmdlfparadox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdlfparadox.c b/client/cmdlfparadox.c index 4ffd7ef61..238d7bc00 100644 --- a/client/cmdlfparadox.c +++ b/client/cmdlfparadox.c @@ -53,7 +53,7 @@ int detectParadox(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint // 00001111 bit pattern represent start of frame, 01 pattern represents a 0 and 10 represents a 1 size_t startIdx = 0; uint8_t preamble[] = {0,0,0,0,1,1,1,1}; - if (preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx)) + if (!preambleSearch(dest, preamble, sizeof(preamble), size, &startIdx)) return -4; //preamble not found size_t numStart = startIdx + sizeof(preamble);