Skip to content

Commit

Permalink
Merge pull request f4exb#2096 from srcejon/freq_scanner
Browse files Browse the repository at this point in the history
Two bug fixes
  • Loading branch information
f4exb authored Apr 30, 2024
2 parents 217c900 + 3976014 commit a31e83d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sdrbase/util/ais.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ AISSafetyMessage::AISSafetyMessage(QByteArray ba) :
m_sequenceNumber = ba[4] & 0x3;
m_destinationId = ((ba[5] & 0xff) << 22) | ((ba[6] & 0xff) << 14) | ((ba[7] & 0xff) << 6) | ((ba[8] >> 2) & 0x3f);
m_retransmitFlag = (ba[8] >> 1) & 0x1;
m_safetyRelatedText = AISMessage::getString(ba, 9, 0, (ba.size() - 9) * 8 / 6);
m_safetyRelatedText = AISMessage::getString(ba, 9, 8, (ba.size() - 9) * 8 / 6);
}

QString AISSafetyMessage::toString()
Expand All @@ -518,7 +518,7 @@ AISSafetyAck::AISSafetyAck(QByteArray ba) :
AISSafetyBroadcast::AISSafetyBroadcast(QByteArray ba) :
AISMessage(ba)
{
m_safetyRelatedText = AISMessage::getString(ba, 5, 0, (ba.size() - 6) * 8 / 6);
m_safetyRelatedText = AISMessage::getString(ba, 5, 8, (ba.size() - 5) * 8 / 6);
}

QString AISSafetyBroadcast::toString()
Expand Down
2 changes: 1 addition & 1 deletion sdrgui/gui/valuedial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ void ValueDial::keyPressEvent(QKeyEvent *value)
emit changed(m_valueNew);
m_cursor++;

if (m_text[m_cursor] == m_groupSeparator) {
if ((m_cursor >= 0) && (m_cursor < m_text.size()) && (m_text[m_cursor] == m_groupSeparator)) {
m_cursor++;
}

Expand Down

0 comments on commit a31e83d

Please sign in to comment.