mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-23 06:20:08 +00:00
Add guard to avoid division by zero
This commit is contained in:
parent
419172ae3b
commit
b7378e4fd8
@ -1030,7 +1030,10 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
||||
decode_FNAV_word(d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
|
||||
break;
|
||||
case 3: // CNAV
|
||||
decode_CNAV_word(current_symbol.Tracking_sample_counter / static_cast<uint64_t>(current_symbol.fs), d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
|
||||
if (current_symbol.fs != 0LL)
|
||||
{
|
||||
decode_CNAV_word(current_symbol.Tracking_sample_counter / static_cast<uint64_t>(current_symbol.fs), d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user