diff options
Diffstat (limited to 'src/gui/panels/strings.c')
-rw-r--r-- | src/gui/panels/strings.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index 895a1b9..9359432 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -745,8 +745,7 @@ static void reload_strings_for_new_list_view(const GStringsPanel *panel, GtkStat VMPA_BUFFER(virt); /* Adresse virtuelle */ GBinPortion *portion; /* Zone mémoire d'appartenance */ const char *area; /* Description de la zone */ - char *text; /* Texte original référencé */ - vmpa2t pos; /* Tête de lecture modifiable */ + const char *text; /* Texte original référencé */ GtkTreeIter iter; /* Point d'insertion */ builder = G_PANEL_ITEM(panel)->builder; @@ -780,18 +779,8 @@ static void reload_strings_for_new_list_view(const GStringsPanel *panel, GtkStat area = g_binary_portion_get_desc(portion); g_object_unref(G_OBJECT(portion)); - text = (char *)calloc(get_mrange_length(range) + 1, sizeof(char)); - - copy_vmpa(&pos, addr); - - if (!g_binary_content_read_raw(content, &pos, get_mrange_length(range), (uint8_t *)text)) - { - free(text); - goto rsfnlv_next; - } - - addr = get_mrange_addr(g_binary_symbol_get_range(symbol)); - vmpa2_virt_to_string(addr, size, virt, NULL); + text = g_string_symbol_get_utf8(G_STR_SYMBOL(symbol)); + if (text == NULL) goto rsfnlv_next; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, @@ -809,8 +798,6 @@ static void reload_strings_for_new_list_view(const GStringsPanel *panel, GtkStat data->count++; - free(text); - rsfnlv_next: g_object_unref(G_OBJECT(symbol)); |