diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-10-08 23:56:41 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-10-08 23:56:41 (GMT) |
commit | cb05b99a8c451ff80d88f988e2654c794b0f3750 (patch) | |
tree | 0845dc11c6ec32765f8f6a08b740ff8b5e804894 /plugins | |
parent | b0f5ae703f50b182e5cb28455b549804cc37fb40 (diff) |
Try to resolve more Kaitai subtypes.
Diffstat (limited to 'plugins')
-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; |