Fix off-by-one error in DelimitedLineTokenizer on blank strings

There is currently a bug causing an ArrayIndexOutOfBoundsException
when trying to tokenize a blank string with more than two characters
This commit is contained in:
geowarin
2017-07-19 21:48:23 +02:00
committed by Michael Minella
parent f6f01b5bb1
commit 96883023b9
2 changed files with 11 additions and 5 deletions

View File

@@ -211,7 +211,7 @@ public class DelimitedLineTokenizer extends AbstractLineTokenizer
int start = offset;
int len = count;
while ((start < (start + len)) && (chars[start] <= ' ')) {
while ((start < (start + len - 1)) && (chars[start] <= ' ')) {
start++;
len--;
}