X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/683180cb6015109a5b4572fcb5d781955a4ff9ba..16cfceb68966bb3022dee37f4c3f4f1bace3f9c5:/client/cmdhfmfu.c?ds=sidebyside diff --git a/client/cmdhfmfu.c b/client/cmdhfmfu.c index 6aac15ce..1b438980 100644 --- a/client/cmdhfmfu.c +++ b/client/cmdhfmfu.c @@ -1614,7 +1614,7 @@ int CmdHF14AMfUDump(const char *Cmd){ PrintAndLog("---------------------------------"); for (i = 0; i < Pages; ++i) { if ( i < 3 ) { - PrintAndLog("%02d/0x%02X | %s| | ", i+startPage, i+startPage, sprint_hex(data + i * 4, 4)); + PrintAndLog("%02d/0x%02X | %s| | %.4s", i+startPage, i+startPage, sprint_hex(data + i * 4, 4), data + i * 4 ); continue; } switch(i){ @@ -1679,8 +1679,10 @@ int CmdHF14AMfUDump(const char *Cmd){ return 1; } fwrite( dump_file_data, 1, Pages*4 + DUMP_PREFIX_LENGTH, fout ); - fclose(fout); - + if (fout) { + fclose(fout); + fout = NULL; + } PrintAndLog("Dumped %d pages, wrote %d bytes to %s", Pages+(DUMP_PREFIX_LENGTH/4), Pages*4 + DUMP_PREFIX_LENGTH, filename); return 0; }