From e9f94d781879f7a5fb71dc89db2b9a2a80fe19fc Mon Sep 17 00:00:00 2001 From: German Blanco Date: Tue, 15 Dec 2015 10:43:48 +0100 Subject: [PATCH] Align end of the loop with comment in previous line (exit when 90 00 or length completed). --- src/libopensc/apdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libopensc/apdu.c b/src/libopensc/apdu.c index 451c7063..c5903956 100644 --- a/src/libopensc/apdu.c +++ b/src/libopensc/apdu.c @@ -504,7 +504,7 @@ sc_get_response(struct sc_card *card, struct sc_apdu *apdu, size_t olen) /* if the card has returned 0x9000 but we still expect data ask for more * until we have read enough bytes */ le = minlen; - } while (rv != 0 || minlen != 0); + } while (rv != 0 && minlen != 0); /* we've read all data, let's return 0x9000 */ apdu->resplen = buf - apdu->resp;