summaryrefslogtreecommitdiff
path: root/src/format
diff options
context:
space:
mode:
Diffstat (limited to 'src/format')
-rw-r--r--src/format/format.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/format/format.c b/src/format/format.c
index 5e5755c..be3627e 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -294,6 +294,7 @@ void g_binary_format_add_symbol(GBinFormat *format, GBinSymbol *symbol)
const mrange_t *range; /* Couverture du symbole */
const vmpa2t *addr; /* Emplacement du symbole */
#endif
+ GBinRoutine *routine; /* Nouvelle routine à insérer */
/**
* Lorsque les fonctions de recherche type g_binary_format_find_symbol_at()
@@ -316,16 +317,18 @@ void g_binary_format_add_symbol(GBinFormat *format, GBinSymbol *symbol)
g_rw_lock_writer_lock(&format->syms_lock);
format->symbols = qinsert(format->symbols, &format->symbols_count,
- sizeof(GBinSymbol *), (__compar_fn_t)g_binary_symbol_cmp, symbol);
+ sizeof(GBinSymbol *), (__compar_fn_t)g_binary_symbol_cmp, &symbol);
switch (g_binary_symbol_get_target_type(symbol))
{
case STP_ROUTINE:
case STP_ENTRY_POINT:
+ routine = g_binary_symbol_get_routine(symbol);
+
format->routines = qinsert(format->routines, &format->routines_count,
sizeof(GBinRoutine *), (__compar_fn_t)g_binary_routine_compare,
- g_binary_symbol_get_routine(symbol));
+ &routine);
break;
default: