Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a877c034 authored by Eric Fischer's avatar Eric Fischer
Browse files

Keep Rfc822Tokenizer from crashing when the string ends with a backslash.

Bug 2442537
parent 9d4b5754
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ public class Rfc822Tokenizer implements MultiAutoCompleteTextView.Tokenizer {
                    if (c == '"') {
                        i++;
                        break;
                    } else if (c == '\\') {
                    } else if (c == '\\' && i + 1 < cursor) {
                        name.append(text.charAt(i + 1));
                        i += 2;
                    } else {
@@ -110,7 +110,7 @@ public class Rfc822Tokenizer implements MultiAutoCompleteTextView.Tokenizer {
                        comment.append(c);
                        level++;
                        i++;
                    } else if (c == '\\') {
                    } else if (c == '\\' && i + 1 < cursor) {
                        comment.append(text.charAt(i + 1));
                        i += 2;
                    } else {