Fix sending binary when ne=0

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-09-24 10:30:09 +02:00
parent 433e509c94
commit 08e7d74a81

View File

@@ -88,10 +88,10 @@ int cmd_read_binary() {
return SW_WARNING_EOF();
}
uint16_t maxle = data_len - offset;
if (apdu.ne > maxle) {
apdu.ne = maxle;
}
//uint16_t maxle = data_len - offset;
//if (apdu.ne > maxle) {
// apdu.ne = maxle;
//}
memcpy(res_APDU, file_get_data(ef) + offset, data_len - offset);
res_APDU_size = data_len - offset;
}