diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index 784e5e9d7..5bb5c4d96 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -752,6 +752,9 @@ BOOL Notepad_plus::notify(SCNotification *notification) // which are closest to the clicked position. for (int32_t i = static_cast(position_of_click); i >= 0; --i) { + if (i >= static_cast(bufstring.size())) + return FALSE; + if (bufstring.at(i) == nppGUI._leftmostDelimiter) { // Respect escaped quotation marks.