fix: ndef parse uri off by one
This commit is contained in:
@@ -225,7 +225,12 @@ static int ndefDecodePayload(NDEFHeader_t *ndef) {
|
||||
}
|
||||
|
||||
if (!strncmp((char *)ndef->Type, "U", ndef->TypeLen)) {
|
||||
PrintAndLogEx(NORMAL, "\turi : %s%.*s", (ndef->Payload[0] <= 0x23 ? URI_s[ndef->Payload[0]] : "[err]"), ndef->PayloadLen, &ndef->Payload[1]);
|
||||
PrintAndLogEx(NORMAL
|
||||
, "\turi : %s%.*s"
|
||||
, (ndef->Payload[0] <= 0x23 ? URI_s[ndef->Payload[0]] : "[err]")
|
||||
, ndef->PayloadLen-1
|
||||
, &ndef->Payload[1]
|
||||
);
|
||||
}
|
||||
|
||||
if (!strncmp((char *)ndef->Type, "Sig", ndef->TypeLen)) {
|
||||
@@ -353,6 +358,5 @@ int NDEFDecodeAndPrint(uint8_t *ndef, size_t ndefLen, bool verbose) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user