mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-12 02:58:35 +08:00
fix: strings
This commit is contained in:
parent
6db8483434
commit
d6bb8d630a
1 changed files with 6 additions and 5 deletions
|
@ -278,6 +278,7 @@ uint16_t PrintFliteBlock(uint16_t tracepos, uint8_t *trace, uint16_t tracelen) {
|
|||
line[0] = 0;
|
||||
for (int j = 0; j < 8; j++)
|
||||
snprintf(line + (j*2), sizeof(line)-1-(j*2), "%02x", trace[j+11]);
|
||||
|
||||
PrintAndLogEx(NORMAL, "REG: regA: %d regB: %d regC: %s ", regA, regB, line);
|
||||
}
|
||||
break;
|
||||
|
@ -299,10 +300,10 @@ uint16_t PrintFliteBlock(uint16_t tracepos, uint8_t *trace, uint16_t tracelen) {
|
|||
char idm[20];
|
||||
char pmm[20];
|
||||
for (int j = 0; j < 8; j++)
|
||||
snprintf(idm + (j * 2), 20, "%02x", trace[j+3]);
|
||||
snprintf(idm + (j*2), sizeof(idm)-1-(j*2), "%02x", trace[j+3]);
|
||||
|
||||
for (int j = 0; j < 8; j++)
|
||||
snprintf(pmm + (j * 2), 20, "%02x", trace[j+11]);
|
||||
snprintf(pmm + (j*2), sizeof(pmm)-1-(j*2), "%02x", trace[j+11]);
|
||||
|
||||
PrintAndLogEx(NORMAL, "DeviceId: IDm: 0x%s PMm: 0x%s ", idm, pmm);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue