Merge pull request #29306 from qarmin/small_code_fixes

Small fixes to unrechable code, possibly overflows, using NULL pointers
This commit is contained in:
Rémi Verschelde 2019-06-12 12:49:21 +02:00 committed by GitHub
commit 971b5160c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 48 additions and 70 deletions

View file

@ -930,7 +930,7 @@ void CodeTextEditor::convert_case(CaseStyle p_case) {
for (int i = begin; i <= end; i++) {
int len = text_editor->get_line(i).length();
if (i == end)
len -= len - end_col;
len = end_col;
if (i == begin)
len -= begin_col;
String new_line = text_editor->get_line(i).substr(i == begin ? begin_col : 0, len);