From 5660920679bb5c5ae48a0e189b52886b0d0776f5 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 2 Oct 2016 12:29:18 +0200 Subject: [PATCH 1/1] FIX: the "hf list legic" on MIM1024 wrapped around readingbyte 255 due to a too small varible size. Causing the upperbits to drop silently --- client/cmdhf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/cmdhf.c b/client/cmdhf.c index b49b35e9..47203808 100644 --- a/client/cmdhf.c +++ b/client/cmdhf.c @@ -389,7 +389,7 @@ void annotateLegic(char *exp, size_t size, uint8_t* cmd, uint8_t cmdsize){ case 9: case 11: { uint8_t cmdBit = (cmd[1] & 1); - uint8_t address = (cmd[2] << 7) | cmd[1] >> 1; + uint16_t address = (cmd[2] << 7) | cmd[1] >> 1; if (cmdBit == LEGIC_READ) snprintf(exp, size, "READ Byte(%d)", address); -- 2.39.2