Skip to content

Commit 553b08c

Browse files
committed
diff BUGFIX always return the first node in reverse diff
1 parent 0a0243a commit 553b08c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/diff.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,6 +3289,9 @@ lyd_diff_reverse_all(const struct lyd_node *src_diff, struct lyd_node **diff)
32893289
/* reverse it */
32903290
LY_CHECK_GOTO(rc = lyd_diff_reverse_siblings_r(*diff, mod), cleanup);
32913291

3292+
/* changing the order of user-ordered nodes may have changed the first node */
3293+
*diff = lyd_first_sibling(*diff);
3294+
32923295
cleanup:
32933296
if (rc) {
32943297
lyd_free_siblings(*diff);

0 commit comments

Comments
 (0)