diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-08-06 16:54:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-08-06 16:54:57 (GMT) |
commit | 4fcc35a52ccb025b6d803d85e017931cd2452960 (patch) | |
tree | e95920f16c273e41f9cae1ea2f02571c221a514e /plugins/kaitai | |
parent | 74d062d4ec55d7ac3914bbf64b8b6c5ab52227df (diff) |
Extend the ROST grammar with a first batch of new features.
Diffstat (limited to 'plugins/kaitai')
-rw-r--r-- | plugins/kaitai/parsers/enum.c | 2 | ||||
-rw-r--r-- | plugins/kaitai/parsers/struct.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/kaitai/parsers/enum.c b/plugins/kaitai/parsers/enum.c index 267aaba..27e5660 100644 --- a/plugins/kaitai/parsers/enum.c +++ b/plugins/kaitai/parsers/enum.c @@ -351,7 +351,7 @@ static int compare_enum_values_by_sized_label(const sized_string_t *l, const enu { int result; /* Bilan à retourner */ - result = szstrcmp(l, (*b)->label); + result = strncmp(l->data, (*b)->label, l->len); // FIXME return result; diff --git a/plugins/kaitai/parsers/struct.c b/plugins/kaitai/parsers/struct.c index 26089d3..128a788 100644 --- a/plugins/kaitai/parsers/struct.c +++ b/plugins/kaitai/parsers/struct.c @@ -578,7 +578,7 @@ GKaitaiEnum *g_kaitai_structure_get_enum(const GKaitaiStruct *kstruct, const siz { other = g_kaitai_enum_get_name(kstruct->enums[i]); - if (szstrcmp(name, other) == 0) + if (strncmp(name->data, other, name->len) == 0) // FIXME { result = kstruct->enums[i]; g_object_ref(G_OBJECT(result)); |