diff options
Diffstat (limited to 'plugins/dex')
-rw-r--r-- | plugins/dex/pool.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/dex/pool.c b/plugins/dex/pool.c index 75841df..d95f519 100644 --- a/plugins/dex/pool.c +++ b/plugins/dex/pool.c @@ -31,6 +31,7 @@ #include <i18n.h> #include <core/global.h> #include <core/nproc.h> +#include <format/strsym.h> #include <mangling/demangler.h> @@ -205,9 +206,8 @@ GBinSymbol *get_string_symbol_from_dex_pool(GDexFormat *format, uint32_t index) uint32_t count; /* Nombre d'éléments présents */ mrange_t range; /* Emplacement de la chaîne */ const char *string; /* Chaîne de caractères liée */ - GBinSymbol *new; /* Nouveau symbol créé */ GBinFormat *base; /* Autre version du format */ - char *label; /* Désignation de la chaîne */ + GBinSymbol *new; /* Nouveau symbol créé */ bool inserted; /* Bilan d'une insertion */ result = NULL; @@ -222,15 +222,11 @@ GBinSymbol *get_string_symbol_from_dex_pool(GDexFormat *format, uint32_t index) string = get_string_from_dex_pool(format, index, &range); if (string == NULL) goto gssfdp_error; - new = g_binary_symbol_new(&range, STP_RO_STRING); - base = G_BIN_FORMAT(format); - label = create_string_label(base, get_mrange_addr(&range), get_mrange_length(&range)); - - g_binary_symbol_set_alt_label(new, label); + new = g_string_symbol_new_read_only(base, &range, SET_MUTF_8); - free(label); + g_string_symbol_build_label(G_STR_SYMBOL(new), base); g_object_ref(G_OBJECT(new)); inserted = g_binary_format_add_symbol(base, new); |