Commit be02a612 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

support attribute unicode strings with multiple trailing zeros

parent a632d347
......@@ -108,7 +108,7 @@ bool AttributeData::toString(const QByteArray& data, QString& str)
case Utf16: {
const ushort* unicode = reinterpret_cast<const ushort*>(data.data());
int size = data.size() / 2;
if (unicode[size - 1] == 0) {
while (size > 0 && unicode[size - 1] == 0) {
--size;
}
#if QT_VERSION >= 0x040000
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment