fix memmove if len=0

This commit is contained in:
merlokk 2019-02-05 18:39:03 +02:00
parent 0e5d896893
commit 69f3e65dd0

View file

@ -2287,11 +2287,13 @@ int iso14_apdu(uint8_t *cmd, uint16_t cmd_len, bool send_chaining, void *data, u
}
if (len) {
// cut frame byte
len -= 1;
// memmove(data_bytes, data_bytes + 1, len);
for (int i = 0; i < len; i++)
data_bytes[i] = data_bytes[i + 1];
}
return len;
}