Verified Commit 3bff533f authored by Fushan Wen's avatar Fushan Wen
Browse files

Adapt to null byte behavior change in Qt6

In Qt5 the terminating \0 character is not considered part of the
byte array, but this behavior was removed in Qt6, so the library needs
to handle the behavior change by itself.

See also:
parent 3a215fac
Pipeline #253973 passed with stage
in 2 minutes and 12 seconds
......@@ -703,7 +703,11 @@ QByteArray KExiv2::getExifTagData(const char* exifTagName) const
char* const s = new char[(*it).size()];
(*it).copy((Exiv2::byte*)s, Exiv2::bigEndian);
QByteArray data(s, (*it).size());
QByteArray data(s, (*it).size() - 1 /* remove '\0' */);
delete[] s;
return data;
Supports Markdown
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