mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
[FS9] Add missing null termination when serializing QStrings
The produced QByteArray was missing the null terminating character, since QByteArray::append() only added up to and not including '\0'. This was also the reason why sometimes planes did not change their aircraft models properly.
This commit is contained in:
committed by
Klaus Basan
parent
ea561cf723
commit
a13f7eb1d4
@@ -29,7 +29,7 @@ namespace BlackSimPlugin
|
||||
|
||||
QByteArray writeValue(QByteArray data, const QString &value)
|
||||
{
|
||||
data.append(qPrintable(value));
|
||||
data.append(qPrintable(value), value.size() + 1);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user