summaryrefslogtreecommitdiff
path: root/src/format/dex/dex.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-04-23 20:23:33 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-04-23 20:23:33 (GMT)
commit3284ce333cc4b09d9150b59c60005af8e4ddc417 (patch)
treeff9c6a51e20f3a15654005f1c9e2ee22d91e7b6c /src/format/dex/dex.c
parentdf4bc1a413561f9de095e1c30c678bd7272c3478 (diff)
Loaded all Dex methods in a proper way.
Diffstat (limited to 'src/format/dex/dex.c')
-rwxr-xr-xsrc/format/dex/dex.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/format/dex/dex.c b/src/format/dex/dex.c
index a918c31..51938f9 100755
--- a/src/format/dex/dex.c
+++ b/src/format/dex/dex.c
@@ -245,11 +245,14 @@ static void g_dex_format_finalize(GDexFormat *format)
GBinFormat *g_dex_format_new(GBinContent *content, GExeFormat *parent)
{
GDexFormat *result; /* Structure à retourner */
+ GBinFormat *base; /* Version basique du format */
vmpa2t pos; /* Position de tête de lecture */
result = g_object_new(G_TYPE_DEX_FORMAT, NULL);
- g_binary_format_set_content(G_BIN_FORMAT(result), content);
+ base = G_BIN_FORMAT(result);
+
+ g_binary_format_set_content(base, content);
init_vmpa(&pos, 0, VMPA_NO_VIRTUAL);
@@ -267,16 +270,15 @@ GBinFormat *g_dex_format_new(GBinContent *content, GExeFormat *parent)
if (!load_all_dex_fields(result))
goto gdfn_error;
- if (!load_all_dex_methods(result))
- goto gdfn_error;
-
if (!load_all_dex_classes(result))
goto gdfn_error;
- if (!g_binary_format_complete_loading(G_BIN_FORMAT(result)))
+ g_binary_format_sort_symbols(base);
+
+ if (!g_binary_format_complete_loading(base))
goto gdfn_error;
- return G_BIN_FORMAT(result);
+ return base;
gdfn_error: