Fixed IndexOutOfBounds

This commit is contained in:
bigguy345 committed 2026-01-03 02:02:54 +02:00
1 parent b613ec86fe
commit df8833103e
1 file changed
+5 -2
@@ -2313,9 +2313,12 @@ public class ScriptDocument {
public List<MethodCallInfo.Argument> parseMethodArguments(int start, int end, MethodInfo methodInfo) {
List<MethodCallInfo.Argument> args = new ArrayList<>();
if (start >= end) {
if (start >= end)
return args; // No arguments
}
if(end > text.length())
end = text.length();
int depth = 0;
int argStart = start;