Skip to content

Commit

Permalink
IR: Fix crash on duty_cycle=1
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL authored and RogueMaster committed Apr 4, 2024
1 parent 125626b commit 92b4f4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/infrared/worker/infrared_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ void infrared_worker_set_raw_signal(
furi_check(timings);
furi_check(timings_cnt > 0);
furi_check((frequency <= INFRARED_MAX_FREQUENCY) && (frequency >= INFRARED_MIN_FREQUENCY));
furi_check((duty_cycle < 1.0f) && (duty_cycle > 0.0f));
furi_check((duty_cycle <= 1.0f) && (duty_cycle > 0.0f));

size_t max_copy_num = COUNT_OF(instance->signal.raw.timings) - 1;
furi_check(timings_cnt <= max_copy_num);
Expand Down

0 comments on commit 92b4f4c

Please sign in to comment.