fix the mifare_classic_transfer() function.

This commit is contained in:
Romain Tartiere 2010-02-18 18:09:34 +00:00
parent acb00368c6
commit 2380583ec6

View file

@ -470,7 +470,12 @@ mifare_classic_restore (MifareClassicTag tag, const MifareClassicBlockNumber blo
{ {
ASSERT_ACTIVE (tag); ASSERT_ACTIVE (tag);
unsigned char command[2]; /*
* Same length as the increment and decrement commands but only the first
* two bytes are actually used. The 4 bytes after the block number are
* meaningless but required (thus left uninitialized).
*/
unsigned char command[6];
/* XXX Should be MC_RESTORE according to the MIFARE documentation. */ /* XXX Should be MC_RESTORE according to the MIFARE documentation. */
command[0] = MC_STORE; command[0] = MC_STORE;
command[1] = block; command[1] = block;