Fix Notepad++ crash due to calling NPPM_GETLANGUAGENAME with WPARAM -1

Fixes #12009, close #12011
This commit is contained in:
Robert Di Pardo 2022-08-12 21:18:05 -04:00 committed by Don Ho
parent f2c4ecd7e1
commit 30f027b6a5
1 changed files with 1 additions and 1 deletions

View File

@ -2406,7 +2406,7 @@ generic_string Notepad_plus::getLangDesc(LangType langType, bool getName)
return generic_string(lexerNameW);
}
if (langType > L_EXTERNAL)
if (langType < L_TEXT || langType > L_EXTERNAL)
langType = L_TEXT;
generic_string str2Show;