From 17d0194aeaea402ca09464e0537db99c384bf4d5 Mon Sep 17 00:00:00 2001
From: merlokk <807634+merlokk@users.noreply.github.com>
Date: Thu, 6 Dec 2018 19:47:57 +0200
Subject: [PATCH] small fix and block scan command

---
 client/emv/cmdemv.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/client/emv/cmdemv.c b/client/emv/cmdemv.c
index 4ab8a8a56..0ddf4e035 100644
--- a/client/emv/cmdemv.c
+++ b/client/emv/cmdemv.c
@@ -707,16 +707,16 @@ int CmdEMVExec(const char *cmd) {
 	bool forceSearch = arg_get_lit(5);
 
 	enum TransactionType TrType = TT_MSD;
-	if (arg_get_lit(6))
-					TrType = TT_QVSDCMCHIP;
 	if (arg_get_lit(7))
-					TrType = TT_CDA;
+					TrType = TT_QVSDCMCHIP;
 	if (arg_get_lit(8))
+					TrType = TT_CDA;
+	if (arg_get_lit(9))
 		TrType = TT_VSDC;
 
-	bool GenACGPO = arg_get_lit(9);
+	bool GenACGPO = arg_get_lit(10);
 	EMVCommandChannel channel = ECC_CONTACTLESS;
-	if (arg_get_lit(10))
+	if (arg_get_lit(11))
 		channel = ECC_CONTACT;
 	CLIParserFree();
 	
@@ -1167,6 +1167,12 @@ int CmdEMVScan(const char *cmd) {
 	
 	SetAPDULogging(showAPDU);
 	
+	// TODO
+	if (channel == ECC_CONTACT) {
+		PrintAndLogEx(ERR, "Do not use contact interface. Exit.");
+		return 1;
+	}
+	
 	// current path + file name
 	if (!strstr(crelfname, ".json"))
 		strcat(crelfname, ".json");