mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 23:36:31 +08:00
bug fix, added 0xFE in the wrong place
This commit is contained in:
parent
8d24e105ea
commit
5280ada054
|
@ -6054,7 +6054,7 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
|
|||
}
|
||||
|
||||
// Has raw bytes ndef a terminator block?
|
||||
if (raw[bytes] != 0xFE) {
|
||||
if (raw[bytes - 1] != 0xFE) {
|
||||
if (fix_msg == false) {
|
||||
PrintAndLogEx(WARNING, "raw NDEF message doesn't have a terminator block, continuing...");
|
||||
} else {
|
||||
|
@ -6063,13 +6063,15 @@ int CmdHFMFNDEFWrite(const char *Cmd) {
|
|||
PrintAndLogEx(WARNING, "no room for terminator block, exiting...");
|
||||
return PM3_EMALLOC;
|
||||
}
|
||||
raw[bytes++] = 0xFE;
|
||||
raw[bytes] = 0xFE;
|
||||
bytes++;
|
||||
PrintAndLogEx(SUCCESS, "Added terminator block (0xFE)");
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
PrintAndLogEx(INFO, "raw: %s", sprint_hex(raw, bytes));
|
||||
PrintAndLogEx(INFO, "Num of Bytes... %u", bytes);
|
||||
print_buffer(raw, bytes, 0);
|
||||
}
|
||||
|
||||
// read MAD Sector 0, block1,2
|
||||
|
|
Loading…
Reference in a new issue