From 3a698dfc0cc1e117dcae60b894b6da5479c03998 Mon Sep 17 00:00:00 2001 From: tharexde Date: Mon, 26 Oct 2020 14:34:40 +0100 Subject: [PATCH] reorder of file types (if extension is neither bin nor eml -> json is assumed) --- client/src/cmdlfem4x50.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdlfem4x50.c b/client/src/cmdlfem4x50.c index 1e27be89a..d26831c26 100644 --- a/client/src/cmdlfem4x50.c +++ b/client/src/cmdlfem4x50.c @@ -975,10 +975,10 @@ int CmdEM4x50Restore(const char *Cmd) { ext[5] = 0x00; if (memcmp(ext, ".eml", 4) == 0) res = loadFileEML(filename, etd.data, &bytes_read) != PM3_SUCCESS; - else if (memcmp(ext, ".json", 5) == 0) - res = loadFileJSON(filename, etd.data, sizeof(etd.data), &bytes_read, NULL); - else + else if (memcmp(ext, ".bin", 4) == 0) res = loadFile(filename, ".bin", etd.data, sizeof(etd.data), &bytes_read); + else + res = loadFileJSON(filename, etd.data, sizeof(etd.data), &bytes_read, NULL); if ((res != PM3_SUCCESS) && (bytes_read != DUMP_FILESIZE)) { PrintAndLogEx(FAILED, "Read error");