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:
@@ -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, '|');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user