forked from qt-creator/qt-creator
Fixed possible crash in the preprocessing phase when the first token in the
`original' (not preprocessed) token stream has the whitespace atttribute on.
This commit is contained in:
@@ -771,7 +771,11 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source,
|
||||
} else {
|
||||
|
||||
if (_dot->whitespace) {
|
||||
const unsigned endOfPreviousToken = (_dot - 1)->end();
|
||||
unsigned endOfPreviousToken = 0;
|
||||
|
||||
if (_dot != _tokens.constBegin())
|
||||
endOfPreviousToken = (_dot - 1)->end();
|
||||
|
||||
const unsigned beginOfToken = _dot->begin();
|
||||
|
||||
const char *start = _source.constBegin() + endOfPreviousToken;
|
||||
|
||||
Reference in New Issue
Block a user