nfc-utils: fix bug (remaining calls to old OddParity table)

This commit is contained in:
Philippe Teuwen 2012-05-02 21:18:31 +00:00
parent b84e3d0f20
commit 1cf9154296

View file

@ -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 (" ");