From a92e712cfeba80290bfdc030a2c2321f6dd28dcc Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 1 Nov 2023 03:06:10 +0100 Subject: [PATCH] fix bad comparisions --- client/src/cmdnfc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/cmdnfc.c b/client/src/cmdnfc.c index 70ca53e97..4e827a32b 100644 --- a/client/src/cmdnfc.c +++ b/client/src/cmdnfc.c @@ -116,7 +116,10 @@ static int CmdNfcDecode(const char *Cmd) { uint8_t *tmp = dump; // if not MIFARE Classic default sizes, assume its Ultralight/NTAG - if (bytes_read != 4096 || bytes_read != 2048 || bytes_read != 1024 || bytes_read != 320) { + if ( bytes_read != MIFARE_4K_MAX_BYTES + && bytes_read != MIFARE_2K_MAX_BYTES + && bytes_read != MIFARE_1K_MAX_BYTES + && bytes_read != MIFARE_MINI_MAX_BYTES) { uint8_t **pd = &tmp; mfu_df_e df = detect_mfu_dump_format(pd, verbose);