summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-04-11 17:33:22 +0300
committerQt by Nokia <qt-info@nokia.com>2012-04-11 19:14:43 +0200
commit9327bc87c3abf58bb471693b5448cd78e3db1b46 (patch)
treececb28ed7d9b8652025b8a992d4296d9e3a1c293 /src/corelib/codecs
parent7ff5fb610c665d8aa5eb5be431e96540caeb75ef (diff)
fix QUtf8 codec to disallow codes in range [U+fdd0..U+fdef]
0xfdef-0xfdd0 is definitely 31 and not 15 :) also fix all copy-pastes of this code (greping for '0xfdd0' helps ;) Change-Id: I8f3bd4fd9d85f9de066f0f5df378b9188c12bd48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Diffstat (limited to 'src/corelib/codecs')
-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 c7076eea3a..18d063a38c 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -58,7 +58,7 @@ static inline bool isUnicodeNonCharacter(uint ucs4)
// U+FDEF (inclusive)
return (ucs4 & 0xfffe) == 0xfffe
- || (ucs4 - 0xfdd0U) < 16;
+ || (ucs4 - 0xfdd0U) < 32;
}
QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::ConverterState *state)