From b2436a8ee8d8cf21883588a110734fece191cffb Mon Sep 17 00:00:00 2001 From: joker2770 <1214220480@qq.com> Date: Sat, 29 Oct 2022 20:42:25 +0800 Subject: [PATCH] fix: Array \'keywordlists[0-1]\' accessed at index -1, which is out of bounds. :bug: --- qscint/scintilla/lexers/LexMetapost.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qscint/scintilla/lexers/LexMetapost.cpp b/qscint/scintilla/lexers/LexMetapost.cpp index 315a1ea..5d067fc 100755 --- a/qscint/scintilla/lexers/LexMetapost.cpp +++ b/qscint/scintilla/lexers/LexMetapost.cpp @@ -175,6 +175,9 @@ static void ColouriseMETAPOSTDoc( if (currentInterface != 0) { extraInterface = currentInterface ; } + else { + extraInterface = 1; + } WordList &keywords = *keywordlists[0] ; WordList &keywords2 = *keywordlists[extraInterface-1] ;