summaryrefslogtreecommitdiffstats
path: root/src/corelib/codecs/qwindowscodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/codecs/qwindowscodec.cpp')
-rw-r--r--src/corelib/codecs/qwindowscodec.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/codecs/qwindowscodec.cpp b/src/corelib/codecs/qwindowscodec.cpp
index 6b703f7517..710935a65a 100644
--- a/src/corelib/codecs/qwindowscodec.cpp
+++ b/src/corelib/codecs/qwindowscodec.cpp
@@ -83,8 +83,12 @@ QString QWindowsLocalCodec::convertToUnicode(const char *chars, int length, Conv
len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,
prev, 2, wc.data(), wc.length());
if (len) {
- prepend = true;
sp.append(QChar(wc[0]));
+ if (mblen == 1) {
+ state->remainingChars = 0;
+ return sp;
+ }
+ prepend = true;
mb++;
mblen--;
wc[0] = 0;