-
-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Description
Sentry Issue: KEYMAN-ANDROID-7A3
StringIndexOutOfBoundsException: begin 0, end -1, length 1
at com.keyman.engine.KMKeyboardJSHandler.performLeftDeletions(KMKeyboardJSHandler.java:346)
at com.keyman.engine.KMKeyboardJSHandler.-$$Nest$smperformLeftDeletions
at com.keyman.engine.KMKeyboardJSHandler$1.run(KMKeyboardJSHandler.java:219)
...
(9 additional frame(s) were not displayed)
I'm not seeing keyboard details to trigger this.
Conceptually, it seems like given a context of 1 character, and attempting to do 2 left deletions we then get to:
int start = 0;
int end = 1-(2+0) = -1;
CharSequence expectedChars;
try {
expectedChars = charsBackup.subSequence(start, end);
which throws because of a negative index.
keyman/android/KMEA/app/src/main/java/com/keyman/engine/KMKeyboardJSHandler.java
Lines 340 to 346 in bc546d0
| // Chop dn+numPairs code points from the end of charsBackup | |
| // subSequence indices are start(inclusive) to end(exclusive) | |
| int start = 0; | |
| int end = charsBackup.length() - (dn + numPairs); | |
| CharSequence expectedChars; | |
| try { | |
| expectedChars = charsBackup.subSequence(start, end); |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
Todo