schema parsers BUGFIX infinite loop
incorrect variable used to move via linked list.
Fixes #774
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index ada61c7..a4a93ee 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -523,7 +523,7 @@
}
}
/* search typedefs in parent's nodes */
- for (parent = node->parent; parent; parent = node->parent) {
+ for (parent = node->parent; parent; parent = parent->parent) {
if (lysp_type_match(name, parent)) {
LOGVAL(ctx->ctx, LY_VLOG_LINE, &ctx->line, LYVE_SYNTAX_YANG,
"Invalid name \"%s\" of typedef - name collision with another scoped type.", name);