summaryrefslogtreecommitdiff
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-04 12:39:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-04 12:39:01 (GMT)
commitade3ee4fd3b78e96deb08210838643969f2f6699 (patch)
tree09003a6f4ac00c09560de9ea9a91c125a7b14f68 /src/gui/dialogs
parenta0463dfa8fe232d01ea925668f393d7507fa787b (diff)
Updated the API for building symbol labels.
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/gotox.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/gui/dialogs/gotox.c b/src/gui/dialogs/gotox.c
index f28654d..72c2f8c 100644
--- a/src/gui/dialogs/gotox.c
+++ b/src/gui/dialogs/gotox.c
@@ -372,7 +372,7 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
size_t index; /* Indice de ligne à traiter */
GBufferLine *line; /* Ligne présente à l'adresse */
char *virtual; /* Transcription d'adresse */
- const char *label; /* Etiquette de symbole trouvé */
+ char *label; /* Etiquette de symbole trouvé */
GBinFormat *format; /* Format associé au binaire */
GBinSymbol *symbol; /* Symbole associé à l'adresse */
phys_t diff; /* Décalage vis à vis du début */
@@ -410,7 +410,17 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
label = g_binary_symbol_get_label(hint);
- name = make_symbol_offset(label, 0);
+ /**
+ * Cf. commentaire suivant.
+ */
+ if (label == NULL)
+ name = strdup(_("<no symbol found>"));
+
+ else
+ {
+ name = make_symbol_offset(label, 0);
+ free(label);
+ }
}
else
@@ -430,7 +440,10 @@ static void add_new_location_to_list(GtkTreeStore *store, GLoadedBinary *binary,
name = strdup(_("<no symbol found>"));
else
+ {
name = make_symbol_offset(label, diff);
+ free(label);
+ }
}
else