From 522dc0d8ac0632cbb9cfed1df0b6f9f2be48f699 Mon Sep 17 00:00:00 2001 From: Yuichiro Hanada Date: Tue, 15 Oct 2013 12:50:18 +0900 Subject: [PATCH] Fix readAndFollowForwardLink. Change-Id: Ifda44e6139a4a1bd065468a7f74cd9483b343644 --- .../android/inputmethod/latin/makedict/Ver4DictDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java index 734223ec2..cc6a54569 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 @@ public class Ver4DictDecoder extends AbstractDictDecoder { @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;