Skip to content

Commit

Permalink
fixed files form Math #101
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 4aab26a commit b4c2f43
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ public Complex parse(String source, ParsePosition pos) {
int n = getImaginaryCharacter().length();
startIndex = pos.getIndex();
int endIndex = startIndex + n;
if (
if ((startIndex >= source.length()) ||
(endIndex > source.length()) ||
source.substring(startIndex, endIndex).compareTo(
getImaginaryCharacter()) != 0) {
// set index back to initial, error index should be the start index
Expand Down

0 comments on commit b4c2f43

Please sign in to comment.