Skip to content

Commit e32c0f2

Browse files
committed
lyb parser BUGFIX parsing union with a user type fix
Fixes #695
1 parent 2b15625 commit e32c0f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parser_lyb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ lyb_parse_value(struct lys_type *type, struct lyd_node_leaf_list *leaf, struct l
716716
LYB_HAVE_READ_RETURN(r, data, -1);
717717

718718
/* union is handled specially */
719-
if (type->base == LY_TYPE_UNION) {
719+
if ((type->base == LY_TYPE_UNION) && !(*value_flags & LY_VALUE_USER)) {
720720
assert(*value_type == LY_TYPE_STRING);
721721

722722
*value_str = value->string;

0 commit comments

Comments
 (0)