Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug on buffer extension.

  • Loading branch information...
commit 610b429bc1e7754c45bce7c7c1053406088b8ebd 1 parent b4da90e
masaruh authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/main/java/org/atilika/kuromoji/trie/DoubleArrayTrie.java
View
2  src/main/java/org/atilika/kuromoji/trie/DoubleArrayTrie.java
@@ -266,7 +266,7 @@ private int findBase(int index, Node[] nodes){
*/
int nextIndex = index + base + node.getKey();
- while(baseBuffer.capacity() < nextIndex) {
+ if(baseBuffer.capacity() <= nextIndex) {
int newLength = nextIndex + 1;
IntBuffer newBaseBuffer = ByteBuffer.allocate(newLength * 4).asIntBuffer();
baseBuffer.rewind();

0 comments on commit 610b429

Please sign in to comment.
Something went wrong with that request. Please try again.