printer_tree BUGFIX first sibling in top-nodes
Added a test where the module contains only augments and should only
print the compiled node using xpath. The problem was accessing the
top-level node of the augmented module.
diff --git a/src/printer_tree.c b/src/printer_tree.c
index bbe231f..3dde21b 100644
--- a/src/printer_tree.c
+++ b/src/printer_tree.c
@@ -3426,7 +3426,7 @@
/* current node is top-node */
switch (tc->section) {
case TRD_SECT_MODULE:
- tc->cn = tc->cmod->data;
+ tc->cn = tc->cn->module->compiled->data;
break;
case TRD_SECT_RPCS:
tc->cn = (const struct lysc_node *)tc->cmod->rpcs;