summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels')
-rw-r--r--src/gui/panels/strings.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c
index 5bba0ca..8814c0b 100644
--- a/src/gui/panels/strings.c
+++ b/src/gui/panels/strings.c
@@ -745,7 +745,9 @@ 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 */
+ size_t len; /* Taille de la chaîne */
const char *text; /* Texte original référencé */
+ char *real_text; /* Texte avec octet nul final */
GtkTreeIter iter; /* Point d'insertion */
builder = G_PANEL_ITEM(panel)->builder;
@@ -779,9 +781,11 @@ 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 = g_string_symbol_get_utf8(G_STR_SYMBOL(symbol));
+ text = g_string_symbol_get_utf8(G_STR_SYMBOL(symbol), &len);
if (text == NULL) goto rsfnlv_next;
+ real_text = strndup(text, len);
+
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
STC_SYMBOL, symbol,
@@ -790,10 +794,12 @@ static void reload_strings_for_new_list_view(const GStringsPanel *panel, GtkStat
STC_AREA, area,
STC_NAME, NULL,
STC_VALUE, NULL,
- STC_ORIGINAL, text,
+ STC_ORIGINAL, real_text,
STC_MATCHED, false,
-1);
+ free(real_text);
+
update_string_node(data, store, &iter);
data->count++;