Skip to content

Commit

Permalink
Merge pull request #227 from hogesako/fix-expand
Browse files Browse the repository at this point in the history
fix incorrect size calculation when expand
  • Loading branch information
kazuma-t authored May 8, 2024
2 parents cabfc87 + 7c3c2f6 commit bbf8ce7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/worksap/nlp/sudachi/LatticeImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void clear() {

void expand(int newSize) {
endLists.ensureCapacity(newSize + 1);
for (int i = size + 1; i < newSize + 1; i++) {
for (int i = capacity + 1; i < newSize + 1; i++) {
endLists.add(new ArrayList<>());
}
capacity = newSize;
Expand Down

0 comments on commit bbf8ce7

Please sign in to comment.