diff options
author | Qt CI Bot <qt_ci_bot@qt-project.org> | 2021-04-16 18:14:35 +0000 |
---|---|---|
committer | Qt CI Bot <qt_ci_bot@qt-project.org> | 2021-04-16 18:14:35 +0000 |
commit | 5839dee30fcbc3a4f3cdd4ace40ef8b2d5d96158 (patch) | |
tree | c44ce001bca00ddf4855c08dadfe37bfe82a484a /src/gui | |
parent | 931929865fce191a4c643070a2793893171aed09 (diff) | |
parent | fdedcb6ec650236bef4a8c8f005b5dd24ef7d77a (diff) |
Merge integration refs/builds/qtci/dev/1618585460
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextengine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 675e87b322..b31b880693 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtGui module of the Qt Toolkit. @@ -258,7 +258,7 @@ struct QBidiAlgorithm { for (int i = 0; i < length; ++i) { int pos = i; char32_t uc = text[i].unicode(); - if (QChar::isHighSurrogate(uc) && i < length - 1) { + if (QChar::isHighSurrogate(uc) && i < length - 1 && text[i + 1].isLowSurrogate()) { ++i; analysis[i].bidiDirection = QChar::DirNSM; uc = QChar::surrogateToUcs4(ushort(uc), text[i].unicode()); |