fixed check when getting value inside xml tag given the key

This commit is contained in:
Alan Yaniger 2021-08-01 17:01:40 +03:00
parent 523407a9c1
commit ad950efc32

View file

@ -618,8 +618,8 @@ static int yang_patch_get_xval(
return ret;
}
cxobj *xn_tmp = NULL;
if (veclen > 0) {
xn_tmp = vec[0]; //veclen should always be 1
if (veclen == 1) { //veclen should always be 1
xn_tmp = vec[0];
}
if (xn_tmp != NULL) {
tmp_val = xml_body(xn_tmp);