aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorMartin Paljak <martin@martinpaljak.net>2012-01-25 18:06:06 +0200
committerHarald Welte <laforge@gnumonks.org>2012-01-25 18:44:38 +0100
commite1bed6d14b9b43d0751dbce13abae787b75d6768 (patch)
tree9dfb3f358b4e73bbc758283468e888d1bed700c1 /host
parent48850386901ef4c833ecd0365b6c5c759a34a280 (diff)
apdu_split: correctly handle Le=00 which means 256.
Diffstat (limited to 'host')
-rw-r--r--host/apdu_split.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/apdu_split.c b/host/apdu_split.c
index f2cfb7a..4d7bd44 100644
--- a/host/apdu_split.c
+++ b/host/apdu_split.c
@@ -100,7 +100,7 @@ static void apdu_split_inbyte(struct apdu_split *as, uint8_t ch)
break;
case APDU_S_P3:
apdu_buf_append(as, ch);
- as->apdu_data_remaining = ch;
+ as->apdu_data_remaining = (ch == 0 ? 256 : ch);
set_state(as, APDU_S_SW1);
break;
case APDU_S_DATA: