diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 966f881b0..19df601ae 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -303,6 +303,7 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere) auto defaultCharListLen = execute(SCI_GETWORDCHARS); char *defaultCharList = new char[defaultCharListLen + 1]; execute(SCI_GETWORDCHARS, 0, reinterpret_cast(defaultCharList)); + defaultCharList[defaultCharListLen] = '\0'; _defaultCharList = defaultCharList; delete[] defaultCharList; }