diff options
-rw-r--r-- | plugins/kaitai/parsers/struct.c | 3 | ||||
-rw-r--r-- | plugins/kaitai/scope.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/kaitai/parsers/struct.c b/plugins/kaitai/parsers/struct.c index 07126c6..f23a264 100644 --- a/plugins/kaitai/parsers/struct.c +++ b/plugins/kaitai/parsers/struct.c @@ -684,6 +684,9 @@ GKaitaiType *g_kaitai_structure_find_sub_type(const GKaitaiStruct *kstruct, cons break; } + result = g_kaitai_structure_find_sub_type(G_KAITAI_STRUCT(kstruct->types[i]), name); + if (result != NULL) break; + } return result; diff --git a/plugins/kaitai/scope.c b/plugins/kaitai/scope.c index 6d1d47a..fad8890 100644 --- a/plugins/kaitai/scope.c +++ b/plugins/kaitai/scope.c @@ -231,7 +231,7 @@ GKaitaiType *find_sub_type(const kaitai_scope_t *locals, const char *name) size_t i; /* Boucle de parcours */ GKaitaiParser *parser; /* Lecteur d'origine */ - GMatchRecord *list[] = { locals->root, locals->parent, locals->last }; + GMatchRecord *list[] = { locals->last, locals->parent, locals->root }; result = NULL; |