mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-09 01:36:52 +08:00
Do not create empty dump files
This commit is contained in:
parent
fe45cdd605
commit
88d45d641c
1 changed files with 5 additions and 0 deletions
|
@ -1952,6 +1952,11 @@ int pm3_load_dump(const char *fn, void **pdump, size_t *dumplen, size_t maxdumpl
|
|||
}
|
||||
|
||||
int pm3_save_dump(const char *fn, uint8_t *d, size_t n, JSONFileType jsft, size_t blocksize) {
|
||||
if (n == 0) {
|
||||
PrintAndLogEx(INFO, "No data to save. Skipping...");
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
saveFile(fn, ".bin", d, n);
|
||||
saveFileEML(fn, d, n, blocksize);
|
||||
saveFileJSON(fn, jsft, d, n, NULL);
|
||||
|
|
Loading…
Reference in a new issue