Fix delimiter selection crash issue

Fix #12384, close #12621
pull/12625/head^2
Don Ho 2022-12-09 15:52:34 +01:00
parent f1e1f6be87
commit 4e4d9d95ce
1 changed files with 3 additions and 0 deletions

View File

@ -752,6 +752,9 @@ BOOL Notepad_plus::notify(SCNotification *notification)
// which are closest to the clicked position.
for (int32_t i = static_cast<int32_t>(position_of_click); i >= 0; --i)
{
if (i >= static_cast<int32_t>(bufstring.size()))
return FALSE;
if (bufstring.at(i) == nppGUI._leftmostDelimiter)
{
// Respect escaped quotation marks.