From 1cf9154296e389cb97a184d723fe367f2a94fd46 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 2 May 2012 21:18:31 +0000 Subject: [PATCH] nfc-utils: fix bug (remaining calls to old OddParity table) --- utils/nfc-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/nfc-utils.c b/utils/nfc-utils.c index ce72465..cdb037c 100644 --- a/utils/nfc-utils.c +++ b/utils/nfc-utils.c @@ -49,7 +49,7 @@ oddparity_bytes_ts (const uint8_t *pbtData, const size_t szLen, uint8_t *pbtPar) size_t szByteNr; // Calculate the parity bits for the command for (szByteNr = 0; szByteNr < szLen; szByteNr++) { - pbtPar[szByteNr] = OddParity[pbtData[szByteNr]]; + pbtPar[szByteNr] = oddparity(pbtData[szByteNr]); } } @@ -95,7 +95,7 @@ print_hex_par (const uint8_t *pbtData, const size_t szBits, const uint8_t *pbtDa for (szPos = 0; szPos < szBytes; szPos++) { printf ("%02x", pbtData[szPos]); - if (OddParity[pbtData[szPos]] != pbtDataPar[szPos]) { + if (oddparity(pbtData[szPos]) != pbtDataPar[szPos]) { printf ("! "); } else { printf (" ");