mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Fix deleted line return
For some reason, `isprint()` claims that `0xff` is printable. But it's used by print functions as a magic value to suppress the line return. So when viewing a dump where the last byte of a block/sector is `0xff`, it was suppressing the new line between blocks/sectors. Signed-off-by: Jean-Michel Picod <jmichel.p@gmail.com>
This commit is contained in:
parent
50bdec092d
commit
eb0d92ea98
1 changed files with 2 additions and 2 deletions
|
@ -529,7 +529,7 @@ char *sprint_hex_ascii(const uint8_t *data, const size_t len) {
|
|||
|
||||
while (i < max_len) {
|
||||
unsigned char c = (unsigned char)data[i];
|
||||
tmp[pos + i] = isprint(c) ? c : '.';
|
||||
tmp[pos + i] = (isprint(c) && c != 0xff) ? c : '.';
|
||||
++i;
|
||||
}
|
||||
out:
|
||||
|
@ -546,7 +546,7 @@ char *sprint_ascii_ex(const uint8_t *data, const size_t len, const size_t min_st
|
|||
|
||||
while (i < max_len) {
|
||||
unsigned char c = (unsigned char)data[i];
|
||||
tmp[i] = isprint(c) ? c : '.';
|
||||
tmp[i] = (isprint(c) && c != 0xff) ? c : '.';
|
||||
++i;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue