From 57b21d479b908b88e2808550f711529d2e694822 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 28 May 2020 16:28:47 +0200 Subject: [PATCH] user_simtrace2: Fix typo in frontend_handle_card2modem() this typo was breaking operating with simtrace2 for all responses that contained more than just a status word. Change-Id: Id8195d6650c3306e1a39f59d78d1348671ad062d --- src/client/user_simtrace2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/user_simtrace2.c b/src/client/user_simtrace2.c index 5ce034d..fa6c319 100644 --- a/src/client/user_simtrace2.c +++ b/src/client/user_simtrace2.c @@ -339,7 +339,7 @@ int frontend_handle_card2modem(struct bankd_client *bc, const uint8_t *data, siz struct osmo_st2_cardem_inst *ci = bc->cardem; // save SW to our current APDU context ac.sw[0] = data[len-2]; - ac.sw[1] = data[len=1]; + ac.sw[1] = data[len-1]; LOGCI(ci, LOGL_DEBUG, "SIMtrace <= SW=0x%02x%02x, len_rx=%zu\n", ac.sw[0], ac.sw[1], len-2); if (len > 2) { // send PB and data to modem