schema helpers BUGFIX find own module if own prefix is used
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 6f3201e..970b2e1 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -1054,8 +1054,8 @@
{
const struct lys_module *m = NULL;
- if (!prefix) {
- return (struct lys_module*)mod;
+ if (!prefix || (!strncmp(prefix, mod->prefix, len) && !mod->prefix[len])) {
+ return (struct lys_module *)mod;
}
if (mod->compiled) {
FIND_MODULE(struct lysc_import, mod->compiled);