diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 97efff836..7bff1db9b 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -1013,7 +1013,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa case NPPM_GETCURRENTWORD: case NPPM_GETCURRENTLINESTR: { - const int strSize = FINDREPLACE_MAXLENGTH * 2; + const int strSize = CURRENTWORD_MAXLENGTH; wchar_t str[strSize] = { '\0' }; wchar_t *pTchar = reinterpret_cast(lParam);