commit | 9006a4e2f2256575e328d5b04263f5b9d9446e6b | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Tue Jun 11 14:56:56 2019 +0200 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Tue Jun 11 14:56:56 2019 +0200 |
tree | 1a4f31deede6780e2cfddb1f13de146b3a86cf36 | |
parent | 13028287199948a7dc670e215846cf152126007b [diff] [blame] |
YANG parser BUGFIX handling empty ('') text arguments.
diff --git a/src/parser_yang.c b/src/parser_yang.c index 328da74..3d3421d 100644 --- a/src/parser_yang.c +++ b/src/parser_yang.c
@@ -1135,6 +1135,11 @@ /* get value */ LY_CHECK_RET(get_argument(ctx, data, arg, NULL, &word, &buf, &word_len)); + if (!word_len) { + /* empty value */ + word = ""; + } + /* store value and spend buf if allocated */ INSERT_WORD(ctx, buf, *value, word, word_len);