diff options
author | Neil <nyamatongwe@gmail.com> | 2014-05-31 13:41:47 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-05-31 13:41:47 +1000 |
commit | 9f37aff73123caca401fedbb18311fa0e314df21 (patch) | |
tree | 28462f2f241f7841563e356112ead7d76d57ba70 /lexers/LexCPP.cxx | |
parent | 95717fdd45e2c489027a1b6875c12f2006cd83c5 (diff) | |
download | scintilla-mirror-9f37aff73123caca401fedbb18311fa0e314df21.tar.gz |
Safer handling of "#define X" which caused fault in debug build with Visual C++.
Diffstat (limited to 'lexers/LexCPP.cxx')
-rw-r--r-- | lexers/LexCPP.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index b8b48aa52..b7ff1859b 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -1211,7 +1211,7 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, while ((endName < restOfLine.length()) && setWord.Contains(static_cast<unsigned char>(restOfLine[endName]))) endName++; std::string key = restOfLine.substr(startName, endName-startName); - if (restOfLine[endName] == '(') { + if ((endName < restOfLine.length()) && (restOfLine.at(endName) == '(')) { // Macro size_t endArgs = endName; while ((endArgs < restOfLine.length()) && (restOfLine[endArgs] != ')')) |