mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-02 05:36:36 +00:00
nfc-utils: fix bug (remaining calls to old OddParity table)
This commit is contained in:
@@ -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 (" ");
|
||||
|
||||
Reference in New Issue
Block a user