Set the dontPrint attribute correctly for the character being checked

This amends 36325f9d86 so that the
dontPrint attribute is set before incrementing i

Change-Id: I0be7386253d8607596489ce1025d2f3f8d468ab4
Pick-to: 5.15
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
bb10
Andy Shaw 2020-05-29 09:55:45 +02:00
parent 915549f6ed
commit f439df7893
1 changed files with 1 additions and 1 deletions

View File

@ -1525,10 +1525,10 @@ void QTextEngine::shapeText(int item) const
if (QChar::isHighSurrogate(string[i])
&& i + 1 < itemLength
&& QChar::isLowSurrogate(string[i + 1])) {
initialGlyphs.attributes[glyph_pos].dontPrint = !QChar::isPrint(QChar::surrogateToUcs4(string[i], string[i + 1]));
++i;
log_clusters[i] = glyph_pos;
initialGlyphs.attributes[glyph_pos].dontPrint = !QChar::isPrint(QChar::surrogateToUcs4(string[i], string[i + 1]));
} else {
initialGlyphs.attributes[glyph_pos].dontPrint = !QChar::isPrint(string[i]);
}