Skip to content

Commit

Permalink
Merge pull request #36 from eliaslevy/master
Browse files Browse the repository at this point in the history
Fix off-by-one error.
  • Loading branch information
takawitter authored Jan 24, 2018
2 parents c69c2a3 + da0ac0f commit 9745705
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ private void setCheck(int index, int id){
private int last;
private SuccinctBitVector term;
private Set<Character> chars = new TreeSet<Character>();
private char[] charToCode = new char[Character.MAX_VALUE];
private char[] charToCode = new char[Character.MAX_VALUE+1];
private static final int BASE_EMPTY = Integer.MAX_VALUE;
private static final DoubleArrayNode[] emptyNodes = {};
}
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ private void setCheck(int index, int value){
private SuccinctBitVector term;
private TailArray tailArray;
private Set<Character> chars = new TreeSet<Character>();
private char[] charToCode = new char[Character.MAX_VALUE];
private char[] charToCode = new char[Character.MAX_VALUE+1];
private static final TermIdNode[] emptyNodes = {};
private static final int BASE_EMPTY = Integer.MAX_VALUE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ private void setCheck(long offset, long nodeOffset){
private long last = Unsafe.ARRAY_INT_BASE_OFFSET;
private SuccinctBitVector term;
private Set<Character> chars = new TreeSet<Character>();
private int[] charToScaledCode = new int[Character.MAX_VALUE];
private int[] charToScaledCode = new int[Character.MAX_VALUE+1];
private static final int BASE_EMPTY = Integer.MAX_VALUE;
private static final DoubleArrayNode[] emptyNodes = {};
}

0 comments on commit 9745705

Please sign in to comment.