From: Andreas Politz Date: Thu, 5 Oct 2017 19:57:17 +0000 (+0200) Subject: Fix assignment of offset to newly inserted nodes. X-Git-Tag: emacs-29.0.90~1616^2~406^2~66 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb9ab6f5c06e8589ac6635e9700dd20e0c925625;p=emacs.git Fix assignment of offset to newly inserted nodes. * src/itree.c (interval_tree_insert): Fix offset. --- diff --git a/src/itree.c b/src/itree.c index 5df2d8d1cc5..785c83ab798 100644 --- a/src/itree.c +++ b/src/itree.c @@ -309,7 +309,9 @@ interval_tree_insert (struct interval_tree *tree, struct interval_node *node) node->left = &tree->nil; node->right = &tree->nil; node->color = ITREE_RED; - node->offset = offset; + node->offset = 0; + node->begin -= offset; + node->end -= offset; node->limit = node->end; node->otick = tree->otick - 1;