Fix warning about out of bounds access in QString::operator[]
Fixes runtime warnings that got triggered by change
c2d2757bcc.
Change-Id: I50620b179de8608f45d6f2ef053eeb8b1e10ae43
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
bb10
parent
a1ea498789
commit
8c092570fc
|
|
@ -358,7 +358,7 @@ void QTextOdfWriter::writeBlock(QXmlStreamWriter &writer, const QTextBlock &bloc
|
|||
int precedingSpaces = 0;
|
||||
int exportedIndex = 0;
|
||||
for (int i=0; i <= fragmentText.count(); ++i) {
|
||||
QChar character = fragmentText[i];
|
||||
QChar character = (i == fragmentText.count() ? QChar() : fragmentText.at(i));
|
||||
bool isSpace = character.unicode() == ' ';
|
||||
|
||||
// find more than one space. -> <text:s text:c="2" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue