parser BUGFIX value of enum
If first enum has value negative integer, it does not set value of highest enum.
diff --git a/src/parser_yang.c b/src/parser_yang.c
index 5205082..799cbfb 100644
--- a/src/parser_yang.c
+++ b/src/parser_yang.c
@@ -1439,6 +1439,10 @@
enm->value = *value;
enm->flags |= LYS_AUTOASSIGNED;
(*value)++;
+ } else if (typ->type->info.enums.enm == enm) {
+ /* change value, which is assigned automatically, if first enum has value. */
+ *value = typ->type->info.enums.enm[0].value;
+ (*value)++;
}
/* check that the value is unique */