summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontengine.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 400ce8366f..0f0ad290fd 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -1364,8 +1364,7 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
QGlyphLayout *glyphs, int *nglyphs,
QFontEngine::ShaperFlags flags) const
{
- int ng = *nglyphs;
- if (!engine(0)->stringToCMap(str, len, glyphs, &ng, flags))
+ if (!engine(0)->stringToCMap(str, len, glyphs, nglyphs, flags))
return false;
const_cast<QFontEngineMulti *>(this)->ensureFallbackFamiliesQueried();
@@ -1415,8 +1414,8 @@ bool QFontEngineMulti::stringToCMap(const QChar *str, int len,
++glyph_pos;
}
- *nglyphs = ng;
- glyphs->numGlyphs = ng;
+ *nglyphs = glyph_pos;
+ glyphs->numGlyphs = glyph_pos;
return true;
}