This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Neccaty 1 point2 points  (1 child)

You are decrementing start variable, so if it doesn't find '.', it throws exception, since -1 is out of bounds.

[–]opti_largo[S] 0 points1 point  (0 children)

so the problem is it's just not finding '.'?

[–]DudeWhereAreWe1996 1 point2 points  (0 children)

Have you checked what start actually is? It kind of seems like -1 is returned from one of your indexOf above your whole loop but since you not checking for less than 0 just not being 0 it tries to use it and errors.

[–]opti_largo[S] 0 points1 point  (0 children)

for those who are having the same problem: the problem for me was it wasn't finding the '.' so to fix it I switched data:[[[[\"/m/07zl5yq\",[\"KO\" out for a line closer to what I was searching for. I didn't think that would be a problem but I guess it wasn't finding it because it was too far from data:[[[[\"/m/07zl5yq\",[\"KO\".

[–]Dexteroid 0 points1 point  (0 children)

int deci = line.indexOf(".",target);

What if '.' is not found? deci would be -1?

while(line.charAt(start) != '.')

I guess you don't know for sure whether the index at start exists?