diff --git a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp index cb059055e..57761cf69 100644 --- a/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp +++ b/PowerEditor/src/ScitillaComponent/AutoCompletion.cpp @@ -382,12 +382,15 @@ void AutoCompletion::getCloseTag(char *closeTag, size_t closeTagSize, size_t car if (size_t(foundTextLen) > closeTagSize - 2) // buffer size is not large enough. -2 for '/' & '\0' return; - char tagHead[3]; - _pEditView->getText(tagHead, targetStart, targetStart+2); + char tagHead[5]; + _pEditView->getText(tagHead, targetStart, targetStart+4); if (tagHead[1] == '/') // "" will be ignored return; + if (strncmp(tagHead, "