fix: passing a struct.

This commit is contained in:
iceman1001 2019-04-30 22:03:20 +02:00
commit f8f39d6196
5 changed files with 7 additions and 6 deletions

View file

@ -157,7 +157,7 @@ main_loop(char *script_cmds_file, char *script_cmd, bool pm3_present) {
// clear array
memset(script_cmd_buf, 0, sizeof(script_cmd_buf));
// get
if (!fgets(script_cmd_buf, sizeof(script_cmd_buf), stdin)) {
if (fgets(script_cmd_buf, sizeof(script_cmd_buf), stdin) == NULL) {
PrintAndLogEx(ERR, "STDIN unexpected end, exit...");
break;
}