1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-13 13:29:50 +04:00

[FL-3817] iButton: fix crash when deleting some keys (#3617)

* iButton: fix crash when deleting some keys
* Fix cyfral crashes
* Better data formatting
* Remove void returns
This commit is contained in:
Astra
2024-04-29 19:56:15 +09:00
committed by GitHub
parent 43c4381820
commit 7414e6d4df
10 changed files with 39 additions and 32 deletions

View File

@@ -325,7 +325,7 @@ static LevelDuration protocol_cyfral_encoder_yield(ProtocolCyfral* proto) {
return result;
}
static void protocol_cyfral_render_uid(FuriString* result, ProtocolCyfral* proto) {
static void protocol_cyfral_render_uid(ProtocolCyfral* proto, FuriString* result) {
furi_string_cat_printf(result, "ID: ");
for(size_t i = 0; i < CYFRAL_DATA_SIZE; ++i) {
furi_string_cat_printf(result, "%02X ", ((uint8_t*)&proto->data)[i]);
@@ -333,10 +333,7 @@ static void protocol_cyfral_render_uid(FuriString* result, ProtocolCyfral* proto
}
static void protocol_cyfral_render_brief_data(ProtocolCyfral* proto, FuriString* result) {
furi_string_cat_printf(result, "ID: ");
for(size_t i = 0; i < CYFRAL_DATA_SIZE; ++i) {
furi_string_cat_printf(result, "%02X ", ((uint8_t*)&proto->data)[i]);
}
protocol_cyfral_render_uid(proto, result);
}
const ProtocolBase ibutton_protocol_misc_cyfral = {