Skip to content
Snippets Groups Projects
Commit 73779f76 authored by Yuichiro Hanada's avatar Yuichiro Hanada
Browse files

Make readUnigramsAndBigramsBinary read linked-list nodes.

Change-Id: I07ae036b0b06e71d7a18f2bf11e4692cd4213568
parent 54717534
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,18 @@ public class BinaryDictIOUtils {
}
if (p.mPosition == p.mNumOfCharGroup) {
stack.pop();
if (formatOptions.mHasLinkedListNode) {
final int forwardLinkAddress = buffer.readUnsignedInt24();
if (forwardLinkAddress != FormatSpec.NO_FORWARD_LINK_ADDRESS) {
// the node has a forward link.
p.mNumOfCharGroup = Position.NOT_READ_GROUPCOUNT;
p.mAddress = forwardLinkAddress;
} else {
stack.pop();
}
} else {
stack.pop();
}
} else {
// the node has more groups.
p.mAddress = buffer.position();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment