[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:
Roland Winklmeier
2016-11-06 00:32:17 +01:00
committed by Klaus Basan
parent ea561cf723
commit a13f7eb1d4
2 changed files with 1 additions and 4 deletions

View File

@@ -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;
}