Skip to content

Commit 49130fa

Browse files
committed
tree data BUGFIX tree must start at top-level
1 parent 27a9350 commit 49130fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/tree_data.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3716,7 +3716,7 @@ lyd_find_path(const struct lyd_node *ctx_node, const char *path, ly_bool output,
37163716

37173717
if (lypath[0].doc_root) {
37183718
/* use the root context node for absolute paths, avoids specific XPath evaluation rules of extensions */
3719-
tree = ctx_node;
3719+
for (tree = ctx_node; tree->parent; tree = tree->parent) {}
37203720
ctx_node = NULL;
37213721
}
37223722

0 commit comments

Comments
 (0)