am a798a16a: am 6d3d5395: Merge "Fix a bug: wrong parent position is written when moving."
* commit 'a798a16a4230f5286bab7dc7e3201576a8fa1905': Fix a bug: wrong parent position is written when moving.main
commit
584e0fd668
|
@ -240,7 +240,8 @@ bool DynamicPatriciaTrieWritingHelper::markNodeAsMovedAndSetPosition(
|
||||||
int parentOffsetFieldPos = nodeReader->getHeadPos()
|
int parentOffsetFieldPos = nodeReader->getHeadPos()
|
||||||
+ DynamicPatriciaTrieWritingUtils::NODE_FLAG_FIELD_SIZE;
|
+ DynamicPatriciaTrieWritingUtils::NODE_FLAG_FIELD_SIZE;
|
||||||
if (!DynamicPatriciaTrieWritingUtils::writeParentPosOffsetAndAdvancePosition(
|
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,
|
// Parent offset cannot be written because of a bug or a broken dictionary; thus,
|
||||||
// we give up to update dictionary.
|
// we give up to update dictionary.
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue