mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 10:11:58 +08:00
Encode ISO15693 response as tag byte by byte, instead of 2 bytes by 2 bytes, so that responses with an odd number of bytes don't end up encoded and transmitted with an extraneous uninitialized byte after the CRC.
This commit is contained in:
parent
0f98e177ba
commit
42f4888f1c
1 changed files with 1 additions and 3 deletions
|
@ -252,11 +252,9 @@ void CodeIso15693AsTag(const uint8_t *cmd, size_t len) {
|
|||
ts->buf[++ts->max] = 0x1D; // 00011101
|
||||
|
||||
// data
|
||||
for (size_t i = 0; i < len; i += 2) {
|
||||
for (size_t i = 0; i < len; i ++) {
|
||||
ts->buf[++ts->max] = encode_4bits[cmd[i] & 0xF];
|
||||
ts->buf[++ts->max] = encode_4bits[cmd[i] >> 4];
|
||||
ts->buf[++ts->max] = encode_4bits[cmd[i + 1] & 0xF];
|
||||
ts->buf[++ts->max] = encode_4bits[cmd[i + 1] >> 4];
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
|
Loading…
Reference in a new issue