diff --git a/client/src/proxmark3.c b/client/src/proxmark3.c index 08a4686ac..c8d70cb0d 100644 --- a/client/src/proxmark3.c +++ b/client/src/proxmark3.c @@ -241,8 +241,11 @@ check_script: // read script file if (fgets(script_cmd_buf, sizeof(script_cmd_buf), current_cmdscriptfile()) == NULL) { + PrintAndLogEx(ERR, "Unexpected end, [%s]", current_cmdscriptfile()); + if (!pop_cmdscriptfile()) break; + goto check_script; } else { prompt_ctx = PROXPROMPT_CTX_SCRIPTFILE;