Fixed: [Using YANG union with decimal64 and string leads to regexp match fail #226](https://github.com/clicon/clixon/issues/226)

This commit is contained in:
Olof hagsand 2021-05-24 21:05:06 +02:00
parent d3b614e67d
commit 60c9172d21
3 changed files with 24 additions and 14 deletions

View file

@ -2885,7 +2885,7 @@ yang_abs_schema_nodeid(yang_stmt *yn,
/* If p0 is NULL an entry will be: [i0] which needs to be transformed to [NULL:i0] */
cv = NULL;
while ((cv = cvec_each(nodeid_cvv, cv)) != NULL){
if (cv_type_get(cv) != CGV_STRING)
if (cv_type_get(cv) != CGV_STRING)
cv_type_set(cv, CGV_STRING);
if ((str = cv_string_get(cv)) == NULL || !strlen(str)){
if (cv_string_set(cv, cv_name_get(cv)) < 0){