Fix possible assertion when using stringToCMap() for a multi engine
authorKonstantin Ritt <ritt.ks@gmail.com>
Fri, 16 Nov 2012 19:07:26 +0000 (21:07 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 27 Nov 2012 15:06:05 +0000 (16:06 +0100)
commit729ca17b39551901ae4b1020b76a1b00539e116c
tree97365687ea614cf03bdf0146b29bc0614651e1ea
parent3e33d29a86a99c4dc068e640b23551a7a6e9ab90
Fix possible assertion when using stringToCMap() for a multi engine

If (*nglyphs < len), stringToCMap() sets *nglyphs to len and returns
false immediately; the caller then must resize the buffer and re-try.
However, QFontEngineMulti::stringToCMap() doesn't update the nglyphs value
and thus the second call would fail, too. This is quite unexpected.

Change-Id: Id2cce7b9faf7706c382fccf023e1b7affa9a10be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
src/gui/text/qfontengine.cpp