[FL-2706, FL-2709] SubGhz: checking saved key files for length (#1485)
* [FL-2706] SubGhz: checking saved key files for length * SubGhz: fix RAW file upload error * [FL-2709] GubGhz: RAW screen fix Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -158,6 +158,11 @@ bool subghz_protocol_encoder_princeton_deserialize(void* context, FlipperFormat*
|
||||
FURI_LOG_E(TAG, "Missing TE");
|
||||
break;
|
||||
}
|
||||
if(instance->generic.data_count_bit !=
|
||||
subghz_protocol_princeton_const.min_count_bit_for_found) {
|
||||
FURI_LOG_E(TAG, "Wrong number of bits in key");
|
||||
break;
|
||||
}
|
||||
//optional parameter parameter
|
||||
flipper_format_read_uint32(
|
||||
flipper_format, "Repeat", (uint32_t*)&instance->encoder.repeat, 1);
|
||||
@@ -320,6 +325,11 @@ bool subghz_protocol_decoder_princeton_deserialize(void* context, FlipperFormat*
|
||||
FURI_LOG_E(TAG, "Deserialize error");
|
||||
break;
|
||||
}
|
||||
if(instance->generic.data_count_bit !=
|
||||
subghz_protocol_princeton_const.min_count_bit_for_found) {
|
||||
FURI_LOG_E(TAG, "Wrong number of bits in key");
|
||||
break;
|
||||
}
|
||||
if(!flipper_format_rewind(flipper_format)) {
|
||||
FURI_LOG_E(TAG, "Rewind error");
|
||||
break;
|
||||
|
Reference in New Issue
Block a user