Stop UDP forwarded AIS packets containing null byte from being truncated as per #903

This commit is contained in:
Jon Beniston 2021-05-18 09:02:38 +01:00
parent 7500932c7c
commit 02cbb599f6
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;