Skip to content

Commit

Permalink
Merge branch 'Crash-on-match-parentheses' into '0.13.1-rc'
Browse files Browse the repository at this point in the history
Protect from bad string access

See merge request devel/studio!384
  • Loading branch information
MrMontag committed Oct 30, 2019
2 parents 59ad80d + 1728c84 commit d8c3e48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/search/searchdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ void SearchDialog::autofillSearchField()
}

ui->combo_search->setFocus();
ui->combo_search->lineEdit()->selectAll();
}

void SearchDialog::updateNrMatches(int current, int max)
Expand Down
1 change: 1 addition & 0 deletions src/syntax/syntaxhighlighter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ void SyntaxHighlighter::scanParentheses(const QString &text, int start, int len,
}
if (invalidParenthesesSyntax.contains(kind)) return;
for (int i = start; i < start+len; ++i) {
if (i >= text.length()) break;
int iPara = validParentheses.indexOf(text.at(i));
if (iPara == 6) {
if (kind == SyntaxKind::IdentifierAssignmentEnd) {
Expand Down

0 comments on commit d8c3e48

Please sign in to comment.