From dba67afa3d383e1a7447d8484968e4e6b0252f1e Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 28 Sep 2019 09:38:07 +1000 Subject: Bug [#2129]. Fix crash with 'interface=none' comment. --- doc/ScintillaHistory.html | 4 ++++ lexers/LexMetapost.cxx | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9adbc9379..72ed06c0a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -568,6 +568,10 @@ SciTE enables use of SCI_ commands in user.context.menu.
  • + Metapost lexer fixes crash with 'interface=none' comment. + Bug #2129. +
  • +
  • Perl lexer supports indented here-docs. Bug #2121.
  • diff --git a/lexers/LexMetapost.cxx b/lexers/LexMetapost.cxx index 315a1eab0..7f4e69e59 100644 --- a/lexers/LexMetapost.cxx +++ b/lexers/LexMetapost.cxx @@ -177,7 +177,8 @@ static void ColouriseMETAPOSTDoc( } WordList &keywords = *keywordlists[0] ; - WordList &keywords2 = *keywordlists[extraInterface-1] ; + WordList kwEmpty; + WordList &keywords2 = (extraInterface > 0) ? *keywordlists[extraInterface - 1] : kwEmpty; StyleContext sc(startPos, length, SCE_METAPOST_TEXT, styler) ; -- cgit v1.2.3