am 6d3d5395: Merge "Fix a bug: wrong parent position is written when moving."

* commit '6d3d53955e58b180db131458431db46b32d79f5d':
  Fix a bug: wrong parent position is written when moving.
This commit is contained in:
Keisuke Kuroyanagi 2013-10-07 21:51:16 -07:00 committed by Android Git Automerger
commit a798a16a42

View file

@ -240,7 +240,8 @@ bool DynamicPatriciaTrieWritingHelper::markNodeAsMovedAndSetPosition(
int parentOffsetFieldPos = nodeReader->getHeadPos()
+ DynamicPatriciaTrieWritingUtils::NODE_FLAG_FIELD_SIZE;
if (!DynamicPatriciaTrieWritingUtils::writeParentPosOffsetAndAdvancePosition(
mBuffer, movedPos, nodeReader->getHeadPos(), &parentOffsetFieldPos)) {
mBuffer, bigramLinkedNodePos, nodeReader->getHeadPos(),
&parentOffsetFieldPos)) {
// Parent offset cannot be written because of a bug or a broken dictionary; thus,
// we give up to update dictionary.
return false;