From b9e86572da783235e54263f74e8ecc199a38a9d0 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 30 Nov 2020 13:35:14 +0100 Subject: [PATCH] lf destron clone: fix parity, thanks @iceman for noticing it --- client/src/cmdlfdestron.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdlfdestron.c b/client/src/cmdlfdestron.c index 59d0c3813..2e020cb47 100644 --- a/client/src/cmdlfdestron.c +++ b/client/src/cmdlfdestron.c @@ -114,7 +114,7 @@ static int CmdDestronClone(const char *Cmd) { uint8_t data_ex[12 + 24] = {0}; // ManchesterEncode need extra room for (int i = 0; i < datalen; i++) { - data_ex[i + 1] = ~data [i] | (evenparity8(data[i]) << 7); + data_ex[i + 1] = ~(data [i] | (oddparity8(data[i]) << 7)); } for (int i = 0; i < 3; i++) { blocks[i + 1] = manchesterEncode2Bytes((data_ex[i * 2] << 8) + data_ex[i * 2 + 1]);