schema features BUGFIX submodule feature search
Main module features mmust be searched if
a feature in submodule without prefix is
being searched for.
diff --git a/src/schema_features.c b/src/schema_features.c
index 9de35ca..16ccaed 100644
--- a/src/schema_features.c
+++ b/src/schema_features.c
@@ -152,6 +152,11 @@
name = ptr + 1;
}
+ /* feature without prefix, look in main module and all submodules */
+ if (pmod->is_submod) {
+ pmod = pmod->mod->parsed;
+ }
+
/* we have the correct module, get the feature */
while ((f = lysp_feature_next(f, pmod, &idx))) {
if (!ly_strncmp(f->name, name, len)) {