commit | 522dc0d8ac0632cbb9cfed1df0b6f9f2be48f699 | [log] [tgz] |
---|---|---|
author | Yuichiro Hanada <yhanada@google.com> | Tue Oct 15 12:50:18 2013 +0900 |
committer | Yuichiro Hanada <yhanada@google.com> | Wed Oct 16 00:16:39 2013 +0900 |
tree | e30d39d44140dc4133b8050243336f4af32a2d0c | |
parent | b067be0e5f08eafd89eb0fd706ba564b898f317a [diff] |
Fix readAndFollowForwardLink. Change-Id: Ifda44e6139a4a1bd065468a7f74cd9483b343644
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java index 734223e..cc6a545 100644 --- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java +++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
@@ -318,7 +318,8 @@ @Override public boolean readAndFollowForwardLink() { - final int nextAddress = mDictBuffer.readUnsignedInt24(); + final int forwardLinkPos = mDictBuffer.position(); + final int nextAddress = forwardLinkPos + BinaryDictDecoderUtils.readSInt24(mDictBuffer); if (nextAddress >= 0 && nextAddress < mDictBuffer.limit()) { mDictBuffer.position(nextAddress); return true;