Skip to content

Commit aabe7cc

Browse files
authored
fix encoding enum numbers (#7581)
1 parent ecdd6ca commit aabe7cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/realm/node_header.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ class NodeHeader {
8686
WTypBits = 0, // Corresponds to wtype_Bits
8787
WTypMult = 1, // Corresponds to wtype_Multiply
8888
WTypIgn = 2, // Corresponds to wtype_Ignore
89-
Packed = 4, // wtype is wtype_Extend
90-
Flex = 5 // wtype is wtype_Extend
89+
Packed = 3, // wtype is wtype_Extend
90+
Flex = 4 // wtype is wtype_Extend
9191
};
9292
// * Packed: tightly packed array (any element size <= 64)
9393
// * WTypBits: less tightly packed. Correspond to wtype_Bits
@@ -753,8 +753,8 @@ static inline void init_header(char* header, realm::NodeHeader::Encoding enc, ui
753753
REALM_ASSERT_DEBUG(bits_pr_elemB <= 64);
754754
REALM_ASSERT_DEBUG(num_elemsA < 1024);
755755
REALM_ASSERT_DEBUG(num_elemsB < 1024);
756-
hw[3] = static_cast<uint16_t>(((bits_pr_elemB - 1) << 10) | num_elemsB);
757756
hw[1] = static_cast<uint16_t>(((bits_pr_elemA - 1) << 10) | num_elemsA);
757+
hw[3] = static_cast<uint16_t>(((bits_pr_elemB - 1) << 10) | num_elemsB);
758758
}
759759
} // namespace
760760

0 commit comments

Comments
 (0)