mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
@@ -157,6 +157,8 @@ bool felica_load(FelicaData* data, FlipperFormat* ff, uint32_t version) {
|
||||
case FelicaStandard:
|
||||
uint32_t systems_total = 0;
|
||||
if(!flipper_format_read_uint32(ff, "System found", &systems_total, 1)) break;
|
||||
if(systems_total == 0) break;
|
||||
|
||||
simple_array_init(data->systems, systems_total);
|
||||
|
||||
for(uint8_t sys_idx = 0; sys_idx < systems_total; sys_idx++) {
|
||||
@@ -181,6 +183,8 @@ bool felica_load(FelicaData* data, FlipperFormat* ff, uint32_t version) {
|
||||
do {
|
||||
uint32_t area_count = 0;
|
||||
if(!flipper_format_read_uint32(ff, "Area found", &area_count, 1)) break;
|
||||
if(area_count == 0) break;
|
||||
|
||||
simple_array_init(system->areas, area_count);
|
||||
|
||||
furi_string_reset(str_key_buffer);
|
||||
@@ -207,6 +211,8 @@ bool felica_load(FelicaData* data, FlipperFormat* ff, uint32_t version) {
|
||||
do {
|
||||
uint32_t service_count = 0;
|
||||
if(!flipper_format_read_uint32(ff, "Service found", &service_count, 1)) break;
|
||||
if(service_count == 0) break;
|
||||
|
||||
simple_array_init(system->services, service_count);
|
||||
|
||||
furi_string_reset(str_key_buffer);
|
||||
@@ -237,6 +243,8 @@ bool felica_load(FelicaData* data, FlipperFormat* ff, uint32_t version) {
|
||||
uint32_t public_block_count = 0;
|
||||
if(!flipper_format_read_uint32(ff, "Public blocks read", &public_block_count, 1))
|
||||
break;
|
||||
if(public_block_count == 0) break;
|
||||
|
||||
simple_array_init(system->public_blocks, public_block_count);
|
||||
for(uint16_t i = 0; i < public_block_count; i++) {
|
||||
furi_string_printf(str_key_buffer, "Block %04X", i);
|
||||
|
||||
Reference in New Issue
Block a user