chg: 'hf mfu eload' - instead of showing a error, it now tells a warning that we only loaded N blocks of data to emulator memory.

It always loads the existing blocks into emulator memory.

The previous message made users belive a error had occured when it actually did load.
This commit is contained in:
iceman1001 2017-12-03 15:23:24 +01:00
parent b89b3399dc
commit 73a5e3b23d

View file

@ -2237,10 +2237,18 @@ int CmdHF14AMfELoad(const char *Cmd) {
fclose(f);
printf("\n");
// Ultralight /Ntag
if ( blockWidth == 8 ) {
if ((blockNum != numBlocks)) {
PrintAndLog("File content error. Got %d must be %d blocks.",blockNum, numBlocks);
PrintAndLog("Warning, Ultralight/Ntag file content, Loaded %d blocks into emulator memory", blockNum);
return 0;
}
} else {
if ((blockNum != numBlocks)) {
PrintAndLog("Error, file content, Only loaded %d blocks, must be %d blocks into emulator memory", blockNum, numBlocks);
return 4;
}
}
PrintAndLog("Loaded %d blocks from file: %s", blockNum, filename);
return 0;
}