From: Ivailo Monev Date: Wed, 8 Sep 2021 17:23:40 +0000 (+0300) Subject: do not overwrite variable in QXmlInputSource::next() X-Git-Tag: 4.12.0~1834 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=f632da798f9a66111ef7ffc195b9c13009128a75;p=kde%2FKatie.git do not overwrite variable in QXmlInputSource::next() Signed-off-by: Ivailo Monev --- diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index 74d8d0c7b..8df6c6fff 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -1090,20 +1090,21 @@ QChar QXmlInputSource::next() d->nextReturnedEndOfData = false; fetchData(); if (d->pos >= d->length) { - return EndOfDocument; + return QXmlInputSource::EndOfDocument; } return next(); } d->nextReturnedEndOfData = true; - return EndOfData; + return QXmlInputSource::EndOfData; } // QXmlInputSource has no way to signal encoding errors. The best we can do // is return EndOfDocument. We do *not* return EndOfData, because the reader // will then just call this function again to get the next char. QChar c = d->unicode[d->pos++]; - if (c.unicode() == EndOfData) - c = EndOfDocument; + if (c.unicode() == QXmlInputSource::EndOfData) { + return QXmlInputSource::EndOfDocument; + } return c; }