mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix a bug: wrong parent position is written when moving.
Change-Id: I93d33ba9105eb85327108cca5706d8db3399de6a
This commit is contained in:
parent
a2821fde60
commit
802e6383ea
@ -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…
x
Reference in New Issue
Block a user