Fix const bytes notation, string notation will add EOL ('\0')

This commit is contained in:
Romuald Conty 2010-10-12 14:02:53 +00:00
parent b333a4b1cf
commit d7bffac0e6
2 changed files with 6 additions and 7 deletions

View file

@ -126,11 +126,10 @@ main (int argc, char *argv[])
printf ("[+] To do this, please send any command after the anti-collision\n");
printf ("[+] For example, send a RATS command or use the \"nfc-anticol\" tool\n");
// Note: We have to build a "fake" nfc_target_t in order to do exactly the same that was done before the new nfc_target_init() was introduced.
nfc_target_t nt = {
.ntt = NTT_GENERIC_PASSIVE_106,
.nti.nai.abtAtqa = "\x04\x00",
.nti.nai.abtUid = "\xde\xad\xbe\xef",
.ntt = NTT_MIFARE,
.nti.nai.abtAtqa = { 0x04, 0x00 },
.nti.nai.abtUid = { 0xde, 0xad, 0xbe, 0xef },
.nti.nai.btSak = 0x20,
.nti.nai.szUidLen = 4,
.nti.nai.szAtsLen = 0,

View file

@ -198,9 +198,9 @@ main (int argc, const char *argv[])
size_t szRxLen;
nfc_target_t nt = {
.ntt = NTT_GENERIC_PASSIVE_106,
.nti.nai.abtAtqa = "\x04\x00",
.nti.nai.abtUid = "\x08\xad\xbe\xaf",
.ntt = NTT_MIFARE,
.nti.nai.abtAtqa = { 0x04, 0x00 },
.nti.nai.abtUid = { 0x08, 0xad, 0xbe, 0xaf },
.nti.nai.btSak = 0x20,
.nti.nai.szUidLen = 4,
.nti.nai.szAtsLen = 0,