Fix Ne value for legacy apdu.

This commit is contained in:
Pol Henarejos 2022-05-31 00:04:46 +02:00
parent 950e276ee8
commit 8d409023bf
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -255,7 +255,7 @@ static int usb_event_handle() {
apdu.nc = apdu.header[4];
apdu.data = apdu.header+5;
apdu.ne = 0;
if (apdu.nc+5+2 == ccid_header->dwLength) {
if (apdu.nc+5+1 == ccid_header->dwLength) {
apdu.ne = apdu.header[ccid_header->dwLength-1];
if (apdu.ne == 0)
apdu.ne = 256;