Skip to content

Commit

Permalink
Fix parameter order in std::clamp for DiSEqC position
Browse files Browse the repository at this point in the history
Fix the parameter order in the std::clamp, used to make sure
that the value read from the database is always in range 1 to 255.
  • Loading branch information
kmdewaal committed Dec 17, 2022
1 parent ba30439 commit 8beba43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/recorders/satipchannel.cpp
Expand Up @@ -105,7 +105,7 @@ bool SatIPChannel::IsOpen(void) const
bool SatIPChannel::Tune(const DTVMultiplex &tuning)
{
uint satipsrc = CardUtil::GetDiSEqCPosition(GetInputID()).toUInt();
satipsrc = std::clamp(1U, satipsrc, 255U);
satipsrc = std::clamp(satipsrc, 1U, 255U);
LOG(VB_CHANNEL, LOG_INFO, LOC + QString("Tune freq=%1,src=%2").arg(tuning.m_frequency).arg(satipsrc));

m_streamHandler->m_satipsrc = satipsrc;
Expand Down

0 comments on commit 8beba43

Please sign in to comment.