1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

NFC: Fix NDEF parser for MIFARE Classic [ci skip]

by Willy-JL in OFW PR 4153
This commit is contained in:
MX
2025-03-28 14:10:16 +03:00
parent 65b1b943d1
commit 6cc4976568
3 changed files with 49 additions and 56 deletions

View File

@@ -36,11 +36,17 @@ void pretty_format_bytes_hex_canonical(
}
const size_t begin_idx = i;
const size_t end_idx = MIN(i + num_places, data_size);
const size_t wrap_idx = i + num_places;
const size_t end_idx = MIN(wrap_idx, data_size);
for(size_t j = begin_idx; j < end_idx; j++) {
furi_string_cat_printf(result, "%02X ", data[j]);
}
if(end_idx < wrap_idx) {
for(size_t j = end_idx; j < wrap_idx; j++) {
furi_string_cat_printf(result, " ");
}
}
furi_string_push_back(result, '|');