summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius@trolltech.com>2009-06-03 11:21:21 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-06-03 11:37:41 (GMT)
commit34d003341c5286354e8277a4cc33182c94549ac0 (patch)
tree2db833aa1ad0e24cf57eb34a2e9320f6f87a7f71 /src
parent259b65c2f5d736dd7f6d81b6390f54464dd5f183 (diff)
downloadQt-34d003341c5286354e8277a4cc33182c94549ac0.zip
Qt-34d003341c5286354e8277a4cc33182c94549ac0.tar.gz
Qt-34d003341c5286354e8277a4cc33182c94549ac0.tar.bz2
Fix BOM for UTF-32 codec
The BOM was created correctly, but half of the BOM was then overwritten by the converted data afterwards. Also made the autotest also do reverse encoding tests where possible. Task-number: 255095 Reviewed-by: lars
Diffstat (limited to 'src')
-rw-r--r--src/corelib/codecs/qutfcodec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index 1ac592e..d9defe1 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -478,7 +478,7 @@ QByteArray QUtf32Codec::convertFromUnicode(const QChar *uc, int len, ConverterSt
data[2] = 0;
data[3] = 0;
}
- data += 2;
+ data += 4;
}
if (endian == BE) {
for (int i = 0; i < len; ++i) {