Fix XML tag mark deletion crash Notepad++ v8.3

The uninitialized structure members contain the random value.
The crash is fixed by initializing them with a default value.

Fix #11128
This commit is contained in:
Don HO 2022-02-04 15:20:55 +01:00
parent ae6361fa35
commit 73a4cdc104

View File

@ -30,21 +30,21 @@ public:
void tagMatch(bool doHiliteAttr); void tagMatch(bool doHiliteAttr);
private: private:
ScintillaEditView *_pEditView; ScintillaEditView* _pEditView = nullptr;
struct XmlMatchedTagsPos { struct XmlMatchedTagsPos {
intptr_t tagOpenStart; intptr_t tagOpenStart = 0;
intptr_t tagNameEnd; intptr_t tagNameEnd = 0;
intptr_t tagOpenEnd; intptr_t tagOpenEnd = 0;
intptr_t tagCloseStart; intptr_t tagCloseStart = 0;
intptr_t tagCloseEnd; intptr_t tagCloseEnd = 0;
}; };
struct FindResult { struct FindResult {
intptr_t start; intptr_t start = 0;
intptr_t end; intptr_t end = 0;
bool success; bool success = false;
}; };
bool getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos); bool getXmlMatchedTagsPos(XmlMatchedTagsPos & tagsPos);