am a3e52e94: Merge "Fix a native crash with shortcuts"

* commit 'a3e52e94fb4f37f00a647f1b1de5424ab597907a':
  Fix a native crash with shortcuts
This commit is contained in:
Jean Chalard 2012-01-13 11:14:08 -08:00 committed by Android Git Automerger
commit eaf8b15d98

View file

@ -662,8 +662,9 @@ inline bool UnigramDictionary::processCurrentNode(const int initialPos,
// The frequency should be here, because we come here only if this is actually // The frequency should be here, because we come here only if this is actually
// a terminal node, and we are on its last char. // a terminal node, and we are on its last char.
const int freq = BinaryFormat::readFrequencyWithoutMovingPointer(DICT_ROOT, pos); const int freq = BinaryFormat::readFrequencyWithoutMovingPointer(DICT_ROOT, pos);
TerminalAttributes terminalAttributes(DICT_ROOT, flags, const int childrenAddressPos = BinaryFormat::skipFrequency(flags, pos);
BinaryFormat::skipFrequency(flags, pos)); const int attributesPos = BinaryFormat::skipChildrenPosition(flags, childrenAddressPos);
TerminalAttributes terminalAttributes(DICT_ROOT, flags, attributesPos);
onTerminal(freq, terminalAttributes, correction, queue); onTerminal(freq, terminalAttributes, correction, queue);
} }