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
1 changed files with 9 additions and 9 deletions

View File

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