Skip to content

Commit 8cddbe7

Browse files
committed
tree data BUGFIX opaque_next function must accept any sibling
1 parent 803af01 commit 8cddbe7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/tree_data.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3262,6 +3262,11 @@ lyd_find_sibling_opaq_next(const struct lyd_node *first, const char *name, struc
32623262
LY_CHECK_ARG_RET(NULL, name, LY_EINVAL);
32633263

32643264
if (first && first->schema) {
3265+
/* find the actual first node */
3266+
while (first->prev->next) {
3267+
first = first->prev;
3268+
}
3269+
32653270
first = first->prev;
32663271
if (first->schema) {
32673272
/* no opaque nodes */

0 commit comments

Comments
 (0)