summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-27 09:56:18 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-27 09:56:43 (GMT)
commit1001a818520e401d6c624eb666dfa4067f2ecd38 (patch)
tree2d8b9663bafd53b4380eb218e793d3f61d95a264 /plugins
parentce422fd3b2831ab37de599f40297c6781e5bdfc0 (diff)
Made the Dex demangler more reliable.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dexbnf/type.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/plugins/dexbnf/type.c b/plugins/dexbnf/type.c
index 75d0b35..29ba0a8 100644
--- a/plugins/dexbnf/type.c
+++ b/plugins/dexbnf/type.c
@@ -203,14 +203,21 @@ static GDataType *dtd_field_type_descriptor(input_buffer *buffer, char ahead)
descriptor = dtd_non_array_field_type_descriptor(buffer, ahead);
- if (dim == 0)
- result = descriptor;
+ if (descriptor == NULL)
+ result = NULL;
else
{
- result = g_encapsulated_type_new(ECT_ARRAY, descriptor);
+ if (dim == 0)
+ result = descriptor;
+
+ else
+ {
+ result = g_encapsulated_type_new(ECT_ARRAY, descriptor);
- g_encapsulated_type_set_dimension(G_ENCAPSULATED_TYPE(result), dim);
+ g_encapsulated_type_set_dimension(G_ENCAPSULATED_TYPE(result), dim);
+
+ }
}