1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-21 03:39:48 +00:00

Implemented range check in IONGSMSSignalSource::get_right_block(int)

This commit is contained in:
Victor Castillo 2024-08-19 15:46:28 +02:00
parent 7cdda8e0dc
commit 174364af31
No known key found for this signature in database
GPG Key ID: 8EF1FC8B7182F608

View File

@ -121,5 +121,10 @@ gr::basic_block_sptr IONGSMSSignalSource::get_right_block()
gr::basic_block_sptr IONGSMSSignalSource::get_right_block(int RF_channel)
{
if (RF_channel < 0 || RF_channel >= static_cast<int>(copy_blocks_.size()))
{
LOG(WARNING) << "'RF_channel' out of bounds while trying to get signal source right block.";
return copy_blocks_[0];
}
return copy_blocks_[RF_channel];
}