From 7aa24806f420d064f325a4b46d6b639095cc7e6b Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 26 Aug 2016 22:31:45 +0200 Subject: [PATCH] FIX: the check for formatlen was wrong. Still missing the other formats, only 26bit in this one. --- client/cmdlfhid.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/cmdlfhid.c b/client/cmdlfhid.c index 16209660..11d996b7 100644 --- a/client/cmdlfhid.c +++ b/client/cmdlfhid.c @@ -428,12 +428,15 @@ int CmdHIDBrute(const char *Cmd){ case 'A': fmtlen = param_get8(Cmd, cmdp+1); cmdp += 2; + bool is_ftm_ok = FALSE; uint8_t ftms[] = {26,33,34,35,37}; for ( uint8_t i = 0; i < sizeof(ftms); i++){ if ( ftms[i] == fmtlen ) { - errors = FALSE; + is_ftm_ok = TRUE; } } + // negated + errors = !is_ftm_ok; break; default: PrintAndLog("Unknown parameter '%c'", param_getchar(Cmd, cmdp)); -- 2.39.2