mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 20:07:32 +00:00
fix StringIndexOutOfBounds in GuiScriptTextArea
This commit is contained in:
1 parent
9b3c8031e7
commit
7d0b44d638
1 file changed
+2
-1
@@ -91,7 +91,8 @@ public class GuiScriptTextArea extends GuiNpcTextField {
|
||||
scrolledLine = Math.min(Math.max((int) (1f * diff * (yMouse - y) / height), 0), diff);
|
||||
}
|
||||
int startBracket = 0, endBracket = 0;
|
||||
if (endSelection - startSelection == 1 || startSelection == endSelection && startSelection < text.length()) {
|
||||
if (startSelection >= 0 && startSelection < text.length() &&
|
||||
(endSelection - startSelection == 1 || startSelection == endSelection)) {
|
||||
char c = text.charAt(startSelection);
|
||||
int found = 0;
|
||||
if (c == '{') {
|
||||
|
||||
Reference in new issue
Block a user