1 parent 5bcd49e commit 553acb0Copy full SHA for 553acb0
1 file changed
src/buffer_set.c
@@ -304,6 +304,7 @@ static inline uint16_t _rotate_right(
304
// a_node->left can be NULL_IDX,
305
// but since we have a special dummy node at offset 0,
306
// we can safely set the parent there instead of branching
307
+ // even if a_node->left == 0
308
_get_node(buffer_set, a_node->left)->parent = a_idx;
309
b_node->parent = parent_idx;
310
b_node->right = a_idx;
@@ -330,6 +331,7 @@ static inline uint16_t _rotate_left(
330
331
// a_node->right can be NULL_IDX,
332
333
334
+ // even if a_node->right == 0
335
_get_node(buffer_set, a_node->right)->parent = a_idx;
336
337
b_node->left = a_idx;
0 commit comments