Merge "Fix two small possible bugs." into jb-dev
commit
bf61bba35f
|
@ -149,8 +149,8 @@ int BigramDictionary::getBigramListPositionForWord(const int32_t *prevWord,
|
||||||
} else {
|
} else {
|
||||||
pos = BinaryFormat::skipOtherCharacters(root, pos);
|
pos = BinaryFormat::skipOtherCharacters(root, pos);
|
||||||
}
|
}
|
||||||
pos = BinaryFormat::skipChildrenPosition(flags, pos);
|
|
||||||
pos = BinaryFormat::skipFrequency(flags, pos);
|
pos = BinaryFormat::skipFrequency(flags, pos);
|
||||||
|
pos = BinaryFormat::skipChildrenPosition(flags, pos);
|
||||||
pos = BinaryFormat::skipShortcuts(root, flags, pos);
|
pos = BinaryFormat::skipShortcuts(root, flags, pos);
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,7 +421,7 @@ inline int BinaryFormat::getWordAtAddress(const uint8_t* const root, const int a
|
||||||
// We count chars in order to avoid infinite loops if the file is broken or
|
// We count chars in order to avoid infinite loops if the file is broken or
|
||||||
// if there is some other bug
|
// if there is some other bug
|
||||||
int charCount = maxDepth;
|
int charCount = maxDepth;
|
||||||
while (-1 != nextChar && --charCount > 0) {
|
while (NOT_A_CHARACTER != nextChar && --charCount > 0) {
|
||||||
outWord[++wordPos] = nextChar;
|
outWord[++wordPos] = nextChar;
|
||||||
nextChar = getCharCodeAndForwardPointer(root, &pos);
|
nextChar = getCharCodeAndForwardPointer(root, &pos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue