1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-02-03 09:44:01 -05:00

Merge pull request #904 from srcejon/fix_903

Stop UDP forwarded AIS packets containing null byte from being truncated
This commit is contained in:
Edouard Griffiths 2021-05-18 11:04:31 +02:00 committed by GitHub
commit 5b291d3182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -171,7 +171,7 @@ bool AISDemod::handleMessage(const Message& cmd)
}
else
{
QString nmea = AISMessage::toNMEA(report.getMessage().data());
QString nmea = AISMessage::toNMEA(report.getMessage());
QByteArray bytes = nmea.toLatin1();
m_udpSocket.writeDatagram(bytes.data(), bytes.size(),
QHostAddress(m_settings.m_udpAddress), m_settings.m_udpPort);

View File

@ -32,7 +32,7 @@ QString AISMessage::toHex()
}
// See: https://gpsd.gitlab.io/gpsd/AIVDM.html
QString AISMessage::toNMEA(QByteArray bytes)
QString AISMessage::toNMEA(const QByteArray bytes)
{
QStringList nmeaSentences;