Commit 2e355dcc authored by Victor Yacovlev's avatar Victor Yacovlev

Fixed #kumir2-1998

parent 048e6bcd
......@@ -622,11 +622,15 @@ QList<Shared::Analizer::LineProp> Analizer::lineProperties() const
value = value | errorMask;
}
const int lineNo = lx->lineNo;
const bool validLineNo = lineNo>=0 && lineNo < result.size();
const int lineLength = validLineNo? result[lineNo].size() : 0;
const bool validLexemPos = lx->linePos >= 0 && lx->linePos < lineLength;
if (validLineNo && validLexemPos) {
result[lineNo][j] = LexemType(value);
const bool validLineNo = lineNo>=0 && lineNo < result.size();
if (validLineNo) {
Shared::Analizer::LineProp & currentLineProp = result[lineNo];
const int lineLength = currentLineProp.size();
const int linePos = j;
const bool validLexemPos = linePos >= 0 && linePos < lineLength;
if (validLexemPos) {
currentLineProp[j] = LexemType(value);
}
}
}
}
......
Markdown is supported
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