Skip to content

Commit

Permalink
Small bug when reading till a character which is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
sangupta committed Feb 16, 2016
1 parent 7f720f8 commit 1e07aee
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ public String readTillNext(String separator) {

int index = this.str.indexOf(separator, current);
if(index < 0) {
int start = this.current;
this.current = str.length();
return this.str.substring(this.current);
return this.str.substring(start);
}

String extracted = this.str.substring(this.current, index);
Expand Down

0 comments on commit 1e07aee

Please sign in to comment.