parser UPDATE anydata is an inner node
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index 62902de..7928262 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -1054,8 +1054,12 @@
struct ly_out *out2 = NULL;
struct lylyb_ctx *lybctx = lyd_lybctx->lybctx;
+ if ((anydata->schema->nodetype == LYS_ANYDATA) && (anydata->value_type != LYD_ANYDATA_DATATREE)) {
+ LOGINT_RET(lybctx->ctx);
+ }
+
if (anydata->value_type == LYD_ANYDATA_DATATREE) {
- /* will be printed as a nested LYB data tree */
+ /* will be printed as a nested LYB data tree because the used modules need to be written */
value_type = LYD_ANYDATA_LYB;
} else {
value_type = anydata->value_type;