[FL-1746] Fix IRDA freeze (#673)
Reading large RAW signal causes freeze Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
1b6a942f4a
commit
c3a1836fcd
@ -257,7 +257,7 @@ void irda_common_decoder_reset_state(IrdaCommonDecoder* common_decoder) {
|
||||
common_decoder->databit_cnt = 0;
|
||||
common_decoder->switch_detect = false;
|
||||
common_decoder->message.protocol = IrdaProtocolUnknown;
|
||||
if (common_decoder->protocol->timings.preamble_mark == 0) {
|
||||
if ((common_decoder->protocol->timings.preamble_mark == 0) && (common_decoder->timings_cnt > 0)) {
|
||||
--common_decoder->timings_cnt;
|
||||
shift_left_array(common_decoder->timings, common_decoder->timings_cnt, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user