tree printer: BUGFIX: copy-paste error
diff --git a/src/printer/tree.c b/src/printer/tree.c
index 0eea882..d1a3060 100644
--- a/src/printer/tree.c
+++ b/src/printer/tree.c
@@ -110,11 +110,11 @@
/* there is nothing in submodules, check module */
if (!has_next) {
if (mnode->nodetype == LY_NODE_RPC) {
- has_next = sibling_is_valid_child(mod->inc[i].submodule->rpc);
+ has_next = sibling_is_valid_child(mod->rpc);
} else if (mnode->nodetype == LY_NODE_NOTIF) {
- has_next = sibling_is_valid_child(mod->inc[i].submodule->notif);
+ has_next = sibling_is_valid_child(mod->notif);
} else {
- has_next = sibling_is_valid_child(mod->inc[i].submodule->data);
+ has_next = sibling_is_valid_child(mod->data);
}
}
}