Commit ed2eb296 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Fixed possible crash in the preprocessing phase when the first token in the

`original' (not preprocessed) token stream has the whitespace atttribute on.
parent f8531cc8
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment