schema helpers BUGFIX find own module if own prefix is used
@@ -1054,7 +1054,7 @@ lys_module_find_prefix(const struct lys_module *mod, const char *prefix, size_t
{
const struct lys_module *m = NULL;
- if (!prefix) {
+ if (!prefix || (!strncmp(prefix, mod->prefix, len) && !mod->prefix[len])) {
return (struct lys_module *)mod;
}
if (mod->compiled) {
