summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qstring.cpp')
-rw-r--r--src/corelib/text/qstring.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index c0cc5d16164..de9560f121e 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -1243,8 +1243,9 @@ Q_NEVER_INLINE static int ucstricmp8(const char *utf8, const char *utf8end, cons
QStringIterator src2(utf16, utf16end);
while (src1 < end1 && src2.hasNext()) {
- char32_t uc1 = 0;
- char32_t *output = &uc1;
+ char32_t decoded[1];
+ char32_t *output = decoded;
+ char32_t &uc1 = decoded[0];
uchar b = *src1++;
const qsizetype res = QUtf8Functions::fromUtf8<QUtf8BaseTraits>(b, output, src1, end1);
if (res < 0) {