Skip to content

Commit

Permalink
Fix XML tag mark deletion crash Notepad++ v8.3
Browse files Browse the repository at this point in the history
The uninitialized structure members contain the random value.
The crash is fixed by initializing them with a default value.

Fix #11128
  • Loading branch information
donho committed Feb 4, 2022
1 parent ae6361f commit 73a4cdc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions PowerEditor/src/ScintillaComponent/xmlMatchedTagsHighlighter.h
Expand Up @@ -30,21 +30,21 @@ class XmlMatchedTagsHighlighter {
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);
Expand Down

0 comments on commit 73a4cdc

Please sign in to comment.