diff --git a/src/gui/painting/qicc.cpp b/src/gui/painting/qicc.cpp index 32d67ea76aa..ea18f38c66f 100644 --- a/src/gui/painting/qicc.cpp +++ b/src/gui/painting/qicc.cpp @@ -606,8 +606,8 @@ bool parseDesc(const QByteArray &data, const TagEntry &tagEntry, QString &descNa // The given length shouldn't include 0-termination, but might. if (stringLen > 1 && unicodeString[stringLen - 1] == 0) --stringLen; - QVarLengthArray utf16hostendian(stringLen); - qFromBigEndian(unicodeString, stringLen, utf16hostendian.data()); + QVarLengthArray utf16hostendian(stringLen); + qFromBigEndian(unicodeString, stringLen, utf16hostendian.data()); descName = QString::fromUtf16(utf16hostendian.data(), stringLen); return true; }