From d077cd83163bacf956b462b2b8685dd7e98449df Mon Sep 17 00:00:00 2001 From: robotastic Date: Mon, 26 May 2014 22:30:45 -0400 Subject: [PATCH] Fixes a crash if an irrecoverable error happens If an irrecoverable error happens, you should start a new sequence since the previous dibit was not set --- p25p1_tdulc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p25p1_tdulc.c b/p25p1_tdulc.c index 56ff081..74b4fdc 100644 --- a/p25p1_tdulc.c +++ b/p25p1_tdulc.c @@ -288,7 +288,8 @@ processTDULC (dsd_opts* opts, dsd_state* state) // Next 10 dibits should be zeros - read_zeros(opts, state, analog_signal_array + 6*(6+6)+6*(6+6), 20, &status_count, 0); + // If an irrecoverable error happens, you should start a new sequence since the previous dibit was not set + read_zeros(opts, state, analog_signal_array + 6*(6+6)+6*(6+6), 20, &status_count, irrecoverable_errors); // Next we should find an status dibit if (status_count != 35) {