summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstringconverter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qstringconverter.cpp')
-rw-r--r--src/corelib/text/qstringconverter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp
index e66f512ed8..a0015c2c83 100644
--- a/src/corelib/text/qstringconverter.cpp
+++ b/src/corelib/text/qstringconverter.cpp
@@ -1063,7 +1063,9 @@ char *QUtf32::convertFromUnicode(char *out, QStringView in, QStringConverter::St
QChar ch;
uint ucs4;
if (state->remainingChars == 1) {
- ch = state->state_data[Data];
+ auto character = state->state_data[Data];
+ Q_ASSERT(character <= 0xFFFF);
+ ch = QChar(character);
// this is ugly, but shortcuts a whole lot of logic that would otherwise be required
state->remainingChars = 0;
goto decode_surrogate;