lyb BUGFIX last opaque string must have length
... because the subtree may not be finished and
its children follow.
diff --git a/src/printer_lyb.c b/src/printer_lyb.c
index 5592fa0..fa983ef 100644
--- a/src/printer_lyb.c
+++ b/src/printer_lyb.c
@@ -623,15 +623,15 @@
/* name */
LY_CHECK_RET(lyb_write_string(opaq->name.name, 0, 1, out, lybctx));
+ /* value */
+ LY_CHECK_RET(lyb_write_string(opaq->value, 0, 1, out, lybctx));
+
/* format */
LY_CHECK_RET(lyb_write_number(opaq->format, 1, out, lybctx));
/* value prefixes */
LY_CHECK_RET(lyb_print_prefix_data(out, opaq->format, opaq->val_prefix_data, lybctx));
- /* value */
- LY_CHECK_RET(lyb_write_string(opaq->value, 0, 0, out, lybctx));
-
return LY_SUCCESS;
}