Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07718a5e authored by Keisuke Kuroynagi's avatar Keisuke Kuroynagi Committed by Android (Google) Code Review
Browse files

Merge "Fix: Reading invalid dictionary position."

parents 21648562 f6aa9e9a
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -76,12 +76,13 @@ class TerminalAttributes {
              mNodeFlags(nodeFlags), mShortcutListSizePos(shortcutPos) {}

    inline ShortcutIterator getShortcutIterator() const {
        // The size of the shortcuts is stored here so that the whole shortcut chunk can be
        // skipped quickly, so we ignore it.
        int shortcutPos = mShortcutListSizePos;
        const bool hasShortcutList = 0 != (mNodeFlags & BinaryFormat::FLAG_HAS_SHORTCUT_TARGETS);
        if (hasShortcutList) {
            BinaryDictionaryTerminalAttributesReadingUtils::getShortcutListSizeAndForwardPointer(
                    mBinaryDictionaryInfo, &shortcutPos);
        const bool hasShortcutList = 0 != (mNodeFlags & BinaryFormat::FLAG_HAS_SHORTCUT_TARGETS);
        }
        // shortcutPos is never used if hasShortcutList is false.
        return ShortcutIterator(mBinaryDictionaryInfo, shortcutPos, hasShortcutList);
    }