Fix AIOOBE

This commit is contained in:
Jakub Valtar
2015-10-22 16:07:50 +02:00
parent 5706bd93b3
commit a460e5220b
@@ -1343,7 +1343,8 @@ public class JEditTextArea extends JComponent
int wordStart = 0;
int wordEnd = lineText.length();
char ch = lineText.charAt(Math.max(0,offset - 1));
int charPos = PApplet.constrain(offset - 1, 0, lineText.length() - 1);
char ch = lineText.charAt(charPos);
CharacterKinds thisWord = CharacterKind(ch,noWordSep);